Link Here
|
|
|
1 |
--- ./include/uapi/linux/libc-compat.h.orig |
2 |
+++ ./include/uapi/linux/libc-compat.h |
3 |
@@ -48,35 +48,26 @@ |
4 |
#ifndef _UAPI_LIBC_COMPAT_H |
5 |
#define _UAPI_LIBC_COMPAT_H |
6 |
|
7 |
-/* We have included glibc headers... */ |
8 |
-#if defined(__GLIBC__) |
9 |
+#ifndef __KERNEL__ /* we're used from userspace */ |
10 |
|
11 |
-/* Coordinate with glibc netinet/in.h header. */ |
12 |
-#if defined(_NETINET_IN_H) |
13 |
+/* Coordinate with libc netinet/in.h header. */ |
14 |
+#ifdef _NETINET_IN_H |
15 |
|
16 |
/* GLIBC headers included first so don't define anything |
17 |
* that would already be defined. */ |
18 |
#define __UAPI_DEF_IN6_ADDR 0 |
19 |
-/* The exception is the in6_addr macros which must be defined |
20 |
- * if the glibc code didn't define them. This guard matches |
21 |
- * the guard in glibc/inet/netinet/in.h which defines the |
22 |
- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ |
23 |
-#if defined(__USE_MISC) || defined (__USE_GNU) |
24 |
#define __UAPI_DEF_IN6_ADDR_ALT 0 |
25 |
-#else |
26 |
-#define __UAPI_DEF_IN6_ADDR_ALT 1 |
27 |
-#endif |
28 |
#define __UAPI_DEF_SOCKADDR_IN6 0 |
29 |
#define __UAPI_DEF_IPV6_MREQ 0 |
30 |
#define __UAPI_DEF_IPPROTO_V6 0 |
31 |
|
32 |
-#else |
33 |
+#else /* defined(_NETINET_IN_H) */ |
34 |
|
35 |
/* Linux headers included first, and we must define everything |
36 |
- * we need. The expectation is that glibc will check the |
37 |
+ * we need. The expectation is that the libc will check the |
38 |
* __UAPI_DEF_* defines and adjust appropriately. */ |
39 |
#define __UAPI_DEF_IN6_ADDR 1 |
40 |
-/* We unconditionally define the in6_addr macros and glibc must |
41 |
+/* We unconditionally define the in6_addr macros and the libc must |
42 |
* coordinate. */ |
43 |
#define __UAPI_DEF_IN6_ADDR_ALT 1 |
44 |
#define __UAPI_DEF_SOCKADDR_IN6 1 |
45 |
@@ -89,7 +80,7 @@ |
46 |
/* If we did not see any headers from any supported C libraries, |
47 |
* or we are being included in the kernel, then define everything |
48 |
* that we need. */ |
49 |
-#else /* !defined(__GLIBC__) */ |
50 |
+#else /* __KERNEL__ */ |
51 |
|
52 |
/* Definitions for in6.h */ |
53 |
#define __UAPI_DEF_IN6_ADDR 1 |
54 |
@@ -98,6 +89,6 @@ |
55 |
#define __UAPI_DEF_IPV6_MREQ 1 |
56 |
#define __UAPI_DEF_IPPROTO_V6 1 |
57 |
|
58 |
-#endif /* __GLIBC__ */ |
59 |
+#endif /* __KERNEL__ */ |
60 |
|
61 |
#endif /* _UAPI_LIBC_COMPAT_H */ |