summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch')
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch39
1 files changed, 20 insertions, 19 deletions
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
index 6ad479863e..064a39193d 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
@@ -11,11 +11,11 @@ Upstream-Status: Submitted
include/uapi/linux/libc-compat.h | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)
-Index: linux-4.4/include/uapi/linux/libc-compat.h
+Index: linux-4.15/include/uapi/linux/libc-compat.h
===================================================================
---- linux-4.4.orig/include/uapi/linux/libc-compat.h
-+++ linux-4.4/include/uapi/linux/libc-compat.h
-@@ -48,13 +48,12 @@
+--- linux-4.15.orig/include/uapi/linux/libc-compat.h 2018-02-05 17:37:44.724314379 -0500
++++ linux-4.15/include/uapi/linux/libc-compat.h 2018-02-05 17:38:02.148913820 -0500
+@@ -49,13 +49,12 @@
#ifndef _UAPI_LIBC_COMPAT_H
#define _UAPI_LIBC_COMPAT_H
@@ -23,16 +23,17 @@ Index: linux-4.4/include/uapi/linux/libc-compat.h
-#if defined(__GLIBC__)
+#ifndef __KERNEL__ /* we're used from userspace */
--/* Coordinate with glibc netinet/in.h header. */
-+/* Coordinate with libc netinet/in.h header. */
- #if defined(_NETINET_IN_H)
+-/* Coordinate with glibc net/if.h header. */
+-#if defined(_NET_IF_H) && defined(__USE_MISC)
++/* Coordinate with libc net/if.h header. */
++#if defined(_NET_IF_H)
-/* GLIBC headers included first so don't define anything
+/* LIBC headers included first so don't define anything
* that would already be defined. */
- #define __UAPI_DEF_IN_ADDR 0
- #define __UAPI_DEF_IN_IPPROTO 0
-@@ -64,15 +63,7 @@
+
+ #define __UAPI_DEF_IF_IFCONF 0
+@@ -99,15 +98,7 @@
#define __UAPI_DEF_IN_CLASS 0
#define __UAPI_DEF_IN6_ADDR 0
@@ -48,7 +49,7 @@ Index: linux-4.4/include/uapi/linux/libc-compat.h
#define __UAPI_DEF_SOCKADDR_IN6 0
#define __UAPI_DEF_IPV6_MREQ 0
#define __UAPI_DEF_IPPROTO_V6 0
-@@ -80,10 +71,10 @@
+@@ -115,10 +106,10 @@
#define __UAPI_DEF_IN6_PKTINFO 0
#define __UAPI_DEF_IP6_MTUINFO 0
@@ -61,7 +62,7 @@ Index: linux-4.4/include/uapi/linux/libc-compat.h
* __UAPI_DEF_* defines and adjust appropriately. */
#define __UAPI_DEF_IN_ADDR 1
#define __UAPI_DEF_IN_IPPROTO 1
-@@ -93,7 +84,7 @@
+@@ -128,7 +119,7 @@
#define __UAPI_DEF_IN_CLASS 1
#define __UAPI_DEF_IN6_ADDR 1
@@ -70,18 +71,18 @@ Index: linux-4.4/include/uapi/linux/libc-compat.h
* coordinate. */
#define __UAPI_DEF_IN6_ADDR_ALT 1
#define __UAPI_DEF_SOCKADDR_IN6 1
-@@ -115,7 +106,7 @@
- /* If we did not see any headers from any supported C libraries,
+@@ -170,7 +161,7 @@
* or we are being included in the kernel, then define everything
- * that we need. */
+ * that we need. Check for previous __UAPI_* definitions to give
+ * unsupported C libraries a way to opt out of any kernel definition. */
-#else /* !defined(__GLIBC__) */
+#else /* __KERNEL__ */
- /* Definitions for in.h */
- #define __UAPI_DEF_IN_ADDR 1
-@@ -138,6 +129,6 @@
- /* Definitions for xattr.h */
+ /* Definitions for if.h */
+ #ifndef __UAPI_DEF_IF_IFCONF
+@@ -262,6 +253,6 @@
#define __UAPI_DEF_XATTR 1
+ #endif
-#endif /* __GLIBC__ */
+#endif /* __KERNEL__ */