diff options
author | CyberLeo <cyberleo@cyberleo.net> | 2020-03-28 05:45:52 -0500 |
---|---|---|
committer | CyberLeo <cyberleo@cyberleo.net> | 2020-03-28 05:45:52 -0500 |
commit | 9297468fa579836e3a6a381b798feb6b78217c2d (patch) | |
tree | 53168212f427afbcf0693b534530a4af803152e9 /system/easy-kernel/uapi-iphdr.patch | |
parent | a63cc05c53a6f4c22422dc8c69808b14d87a6f6e (diff) | |
parent | da5a69b65a8791fffa6e93366ee585f87eff136d (diff) | |
download | packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.gz packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.bz2 packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.xz packages-9297468fa579836e3a6a381b798feb6b78217c2d.zip |
Merge branch 'master' into zfs
Diffstat (limited to 'system/easy-kernel/uapi-iphdr.patch')
-rw-r--r-- | system/easy-kernel/uapi-iphdr.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/system/easy-kernel/uapi-iphdr.patch b/system/easy-kernel/uapi-iphdr.patch new file mode 100644 index 000000000..8436b035b --- /dev/null +++ b/system/easy-kernel/uapi-iphdr.patch @@ -0,0 +1,47 @@ +From 62689a5371ff8bbfc8c04625794c62d957b0863f Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> +Date: Sat, 21 Dec 2019 23:36:33 -0600 +Subject: [PATCH] uapi: Prevent redefinition of struct iphdr + +As with struct ethhdr, the musl libc provides its own definition of the +iphdr struct. This guard ensures software like net-tools builds correctly +on the musl libc. + +The __UAPI_DEF_IPHDR definition is in ip.h itself to prevent the issue in +commit da360299b673 ("uapi/if_ether.h: move __UAPI_DEF_ETHHDR libc define") +from being seen here. + +Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com> +--- + include/uapi/linux/ip.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h +index e42d13b55cf3..d34a0d295672 100644 +--- a/include/uapi/linux/ip.h ++++ b/include/uapi/linux/ip.h +@@ -83,6 +83,13 @@ + + #define IPV4_BEET_PHMAXLEN 8 + ++/* Allow libcs to deactivate this - musl has its own copy in <netinet/ip.h> */ ++ ++#ifndef __UAPI_DEF_IPHDR ++#define __UAPI_DEF_IPHDR 1 ++#endif ++ ++#if __UAPI_DEF_IPHDR + struct iphdr { + #if defined(__LITTLE_ENDIAN_BITFIELD) + __u8 ihl:4, +@@ -104,6 +111,7 @@ struct iphdr { + __be32 daddr; + /*The options start here. */ + }; ++#endif + + + struct ip_auth_hdr { +-- +2.22.1 + |