diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2015-06-11 18:16:08 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-06-11 18:16:08 -0400 |
commit | 8eddda8072add075ebf56cf6d288bc1450d6b5f8 (patch) | |
tree | 373e2d36142a298a821f6643c097007aa38aa29f /sys-kernel/linux-headers/files/libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch | |
download | musl-8eddda8072add075ebf56cf6d288bc1450d6b5f8.tar.gz musl-8eddda8072add075ebf56cf6d288bc1450d6b5f8.tar.bz2 musl-8eddda8072add075ebf56cf6d288bc1450d6b5f8.zip |
Initial migration from hardened-dev::musl
Diffstat (limited to 'sys-kernel/linux-headers/files/libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch')
-rw-r--r-- | sys-kernel/linux-headers/files/libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sys-kernel/linux-headers/files/libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch b/sys-kernel/linux-headers/files/libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch new file mode 100644 index 00000000..b8ac94fb --- /dev/null +++ b/sys-kernel/linux-headers/files/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 <linux/types.h> ++#include <linux/libc-compat.h> + + /* + * 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 + |