summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch')
-rw-r--r--poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
new file mode 100644
index 000000000..fb7e1de17
--- /dev/null
+++ b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
@@ -0,0 +1,30 @@
+From 75ba4a547282f91d653872a4bba5f5eae234ea6c Mon Sep 17 00:00:00 2001
+From: rofl0r <retnyg@gmx.net>
+Date: Wed, 22 Jan 2014 00:57:48 +0100
+Subject: [PATCH 2/3] libc-compat.h: prevent redefinition of struct ethhdr
+
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Submitted
+
+ include/uapi/linux/if_ether.h | 4 +++-
+ include/uapi/linux/libc-compat.h | 6 ++++++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+Index: linux-4.15/include/uapi/linux/libc-compat.h
+===================================================================
+--- linux-4.15.orig/include/uapi/linux/libc-compat.h 2018-02-05 17:40:42.338370731 -0500
++++ linux-4.15/include/uapi/linux/libc-compat.h 2018-02-05 17:40:42.334370603 -0500
+@@ -51,6 +51,12 @@
+
+ #ifndef __KERNEL__ /* we're used from userspace */
+
++#ifdef _NETINET_IF_ETHER_H /* musl */
++#define __UAPI_DEF_ETHHDR 0
++#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */
++#define __UAPI_DEF_ETHHDR 1
++#endif
++
+ /* Coordinate with libc net/if.h header. */
+ #if defined(_NET_IF_H)
+
OpenPOWER on IntegriCloud