[uClibc] Sanitizing kernel headers

Peter S. Mazinger ps.m at gmx.net
Wed Nov 10 07:49:03 UTC 2004


Hello!

I have some GLIBC occurences in the 2.4.27 headers (they are for libc5), 
and think that the following patches should be used for buildroot (the 
other archs have similar entries too, grep GLIBC include/asm-<arch>/*)

Could someone w/ more internal uClibc knowledge check that the disabled 
definitions are really defined in uClibc headers?

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2
-------------- next part --------------
--- include/asm-i386/socket.h.mps	2004-11-07 21:43:50.000000000 +0100
+++ include/asm-i386/socket.h	2004-11-07 21:44:36.000000000 +0100
@@ -46,7 +46,7 @@
 #define SO_ACCEPTCONN		30
 
 /* Nasty libc5 fixup - bletch */
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#if defined(__KERNEL__) || ((!defined(__GLIBC__) || (__GLIBC__ < 2)) && !defined(__UCLIBC__))
 /* Socket types. */
 #define SOCK_STREAM	1		/* stream (connection) socket	*/
 #define SOCK_DGRAM	2		/* datagram (conn.less) socket	*/
--- include/asm-i386/posix_types.h.mps	2004-11-07 21:51:37.000000000 +0100
+++ include/asm-i386/posix_types.h	2004-11-07 21:51:55.000000000 +0100
@@ -44,7 +44,7 @@
 #endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
 } __kernel_fsid_t;
 
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#if defined(__KERNEL__) || ((!defined(__GLIBC__) || (__GLIBC__ < 2)) && !defined(__UCLIBC__))
 
 #undef	__FD_SET
 #define __FD_SET(fd,fdsetp) \
-------------- next part --------------
--- include/linux/socket.h.mps	2004-11-07 21:54:41.000000000 +0100
+++ include/linux/socket.h	2004-11-07 21:56:06.000000000 +0100
@@ -16,7 +16,7 @@
 				/* _SS_MAXSIZE value minus size of ss_family */
 } __attribute__ ((aligned(_K_SS_ALIGNSIZE)));	/* force desired alignment */
 
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#if defined(__KERNEL__) || ((!defined(__GLIBC__) || (__GLIBC__ < 2)) && !defined(__UCLIBC__))
 
 #include <asm/socket.h>			/* arch-dependent defines	*/
 #include <linux/sockios.h>		/* the SIOCxxx I/O controls	*/
--- include/linux/stat.h.mps	2004-11-07 21:56:14.000000000 +0100
+++ include/linux/stat.h	2004-11-07 21:56:32.000000000 +0100
@@ -7,7 +7,7 @@
 
 #endif
 
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#if defined(__KERNEL__) || ((!defined(__GLIBC__) || (__GLIBC__ < 2)) && !defined(__UCLIBC__))
 
 #define S_IFMT  00170000
 #define S_IFSOCK 0140000
--- include/linux/coda.h.mps	2004-11-07 21:57:16.000000000 +0100
+++ include/linux/coda.h	2004-11-07 21:58:09.000000000 +0100
@@ -101,7 +101,7 @@
 #if defined(__linux__)
 #define cdev_t u_quad_t
 #ifndef __KERNEL__
-#if !defined(_UQUAD_T_) && (!defined(__GLIBC__) || __GLIBC__ < 2)
+#if !defined(_UQUAD_T_) && ((!defined(__GLIBC__) || __GLIBC__ < 2) && !defined(__UCLIBC__))
 #define _UQUAD_T_ 1
 typedef unsigned long long u_quad_t;
 #endif


More information about the uClibc mailing list