From d2bf04f6c61c8900da1ee537b3a630a484d2d2a8 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 25 Mar 2014 18:40:54 +0000 Subject: main/linux-headers: musl compat fixes --- ...t.h-prevent-redefinition-of-struct-ethhdr.patch | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 main/linux-headers/4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch (limited to 'main/linux-headers/4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch') diff --git a/main/linux-headers/4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch b/main/linux-headers/4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch new file mode 100644 index 000000000..b8ac94fb0 --- /dev/null +++ b/main/linux-headers/4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch @@ -0,0 +1,39 @@ +--- ./include/uapi/linux/if_ether.h.orig ++++ ./include/uapi/linux/if_ether.h +@@ -22,6 +22,7 @@ + #define _UAPI_LINUX_IF_ETHER_H + + #include ++#include + + /* + * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble +@@ -130,11 +131,12 @@ + * This is an Ethernet frame header. + */ + ++#if __UAPI_DEF_ETHHDR + struct ethhdr { + unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ + unsigned char h_source[ETH_ALEN]; /* source ether addr */ + __be16 h_proto; /* packet type ID field */ + } __attribute__((packed)); +- ++#endif + + #endif /* _UAPI_LINUX_IF_ETHER_H */ +--- ./include/uapi/linux/libc-compat.h.orig ++++ ./include/uapi/linux/libc-compat.h +@@ -50,6 +50,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 netinet/in.h header. */ + #ifdef _NETINET_IN_H + -- cgit v1.2.3