[klibc] [patch 02/12] make __u8 and friends visible

Erik van Konijnenburg ekonijn at xs4all.nl
Sun May 22 07:50:44 PDT 2005


The type __u8 and friends are not normally visible
to userspace.  Include <linux/types.h> (which *must*
have <sys/types.h> included before) to make this available.

A possible alternative is to replace __u8 with uint8_t
everywhere and include <stdint.h>.  Perhaps cleaner,
but more intrusive.

Signed-off-by: Erik van Konijnenburg <ekonijn at xs4all.nl>

Index: exec/ipconfig/bootp_proto.c
===================================================================
--- exec.orig/ipconfig/bootp_proto.c	2004-09-03 00:12:07.000000000 +0200
+++ exec/ipconfig/bootp_proto.c	2005-05-21 12:47:33.000000000 +0200
@@ -4,6 +4,7 @@
  * BOOTP packet protocol handling.
  */
 #include <sys/types.h>
+#include <linux/types.h>	/* for __u8 */
 #include <sys/uio.h>
 #include <stdio.h>
 #include <stdlib.h>
Index: exec/ipconfig/dhcp_proto.c
===================================================================
--- exec.orig/ipconfig/dhcp_proto.c	2004-07-02 16:15:47.000000000 +0200
+++ exec/ipconfig/dhcp_proto.c	2005-05-21 12:48:25.000000000 +0200
@@ -4,6 +4,7 @@
  * DHCP RFC 2131 and 2132
  */
 #include <sys/types.h>
+#include <linux/types.h>	/* for __u8 */
 #include <sys/uio.h>
 #include <netinet/in.h>
 #include <stdio.h>
Index: exec/ipconfig/ipconfig.h
===================================================================
--- exec.orig/ipconfig/ipconfig.h	2005-05-21 12:54:36.000000000 +0200
+++ exec/ipconfig/ipconfig.h	2005-05-21 12:54:55.000000000 +0200
@@ -2,6 +2,9 @@
  * ipconfig/ipconfig.h
  */
 
+#include <sys/types.h>
+#include <linux/types.h>	/* for __u16 */
+
 #define LOCAL_PORT	68
 #define REMOTE_PORT	(LOCAL_PORT - 1)
 
Index: exec/nfsmount/sunrpc.h
===================================================================
--- exec.orig/nfsmount/sunrpc.h	2004-06-17 09:29:29.000000000 +0200
+++ exec/nfsmount/sunrpc.h	2005-05-21 12:55:42.000000000 +0200
@@ -1,6 +1,8 @@
 /*
  * sunrpc.h - open-coded SunRPC structures
  */
+#include <sys/types.h>
+#include <linux/types.h>	/* for __u32 */
 
 #define SUNRPC_PORT	111
 #define MOUNT_PORT	627

--



More information about the klibc mailing list