summaryrefslogtreecommitdiff
path: root/target/linux/generic/pending-4.9
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic/pending-4.9')
-rw-r--r--target/linux/generic/pending-4.9/270-uapi-kernel.h-glibc-specific-inclusion-of-sysinfo.h.patch32
-rw-r--r--target/linux/generic/pending-4.9/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch105
-rw-r--r--target/linux/generic/pending-4.9/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch65
3 files changed, 0 insertions, 202 deletions
diff --git a/target/linux/generic/pending-4.9/270-uapi-kernel.h-glibc-specific-inclusion-of-sysinfo.h.patch b/target/linux/generic/pending-4.9/270-uapi-kernel.h-glibc-specific-inclusion-of-sysinfo.h.patch
deleted file mode 100644
index 9c30fa8..0000000
--- a/target/linux/generic/pending-4.9/270-uapi-kernel.h-glibc-specific-inclusion-of-sysinfo.h.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From: David Heidelberger <david.heidelberger@ixit.cz>
-Subject: uapi/kernel.h: glibc specific inclusion of sysinfo.h
-
-including sysinfo.h from kernel.h makes no sense whatsoever,
-but removing it breaks glibc's userspace header,
-which includes kernel.h instead of sysinfo.h from their sys/sysinfo.h.
-this seems to be a historical mistake.
-on musl, including any header that uses kernel.h directly or indirectly
-plus sys/sysinfo.h will produce a compile error due to redefinition of
-struct sysinfo from sys/sysinfo.h.
-so for now, only include it on glibc or when including from kernel
-in order not to break their headers.
-
-Signed-off-by: John Spencer <maillist-linux@barfooze.de>
-Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- include/uapi/linux/kernel.h | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/include/uapi/linux/kernel.h
-+++ b/include/uapi/linux/kernel.h
-@@ -1,7 +1,9 @@
- #ifndef _UAPI_LINUX_KERNEL_H
- #define _UAPI_LINUX_KERNEL_H
-
-+#if defined(__KERNEL__) || defined( __GLIBC__)
- #include <linux/sysinfo.h>
-+#endif
-
- /*
- * 'kernel.h' contains some often-used function prototypes etc
diff --git a/target/linux/generic/pending-4.9/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch b/target/linux/generic/pending-4.9/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch
deleted file mode 100644
index a4aa156..0000000
--- a/target/linux/generic/pending-4.9/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From: David Heidelberger <david.heidelberger@ixit.cz>
-Subject: uapi/libc-compat.h: do not rely on __GLIBC__
-
-Musl provides the same structs as glibc, but does not provide a define to
-allow its detection. Since the absence of __GLIBC__ also can mean that it
-is included from the kernel, change the __GLIBC__ detection to
-!__KERNEL__, which should always be true when included from userspace.
-
-Signed-off-by: John Spencer <maillist-linux@barfooze.de>
-Tested-by: David Heidelberger <david.heidelberger@ixit.cz>
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- include/uapi/linux/libc-compat.h | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
---- a/include/uapi/linux/libc-compat.h
-+++ b/include/uapi/linux/libc-compat.h
-@@ -48,13 +48,13 @@
- #ifndef _UAPI_LIBC_COMPAT_H
- #define _UAPI_LIBC_COMPAT_H
-
--/* We have included glibc headers... */
--#if defined(__GLIBC__)
-+/* We have included libc headers... */
-+#if !defined(__KERNEL__)
-
--/* 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) && (!defined(__GLIBC__) || defined(__USE_MISC))
-
--/* 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_IF_IFCONF 0
-@@ -65,7 +65,11 @@
- #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0
- /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
- #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
-+#ifdef __GLIBC__
- #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
-+#else
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
-+#endif
- #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
-
- #else /* _NET_IF_H */
-@@ -85,10 +89,10 @@
-
- #endif /* _NET_IF_H */
-
--/* Coordinate with glibc netinet/in.h header. */
-+/* Coordinate with libc netinet/in.h header. */
- #if defined(_NETINET_IN_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
-@@ -102,7 +106,7 @@
- * if the glibc code didn't define them. This guard matches
- * the guard in glibc/inet/netinet/in.h which defines the
- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */
--#if defined(__USE_MISC) || defined (__USE_GNU)
-+#if !defined(__GLIBC__) || defined(__USE_MISC) || defined (__USE_GNU)
- #define __UAPI_DEF_IN6_ADDR_ALT 0
- #else
- #define __UAPI_DEF_IN6_ADDR_ALT 1
-@@ -117,7 +121,7 @@
- #else
-
- /* Linux headers included first, and we must define everything
-- * we need. The expectation is that glibc will check the
-+ * we need. The expectation is that the libc will check the
- * __UAPI_DEF_* defines and adjust appropriately. */
- #define __UAPI_DEF_IN_ADDR 1
- #define __UAPI_DEF_IN_IPPROTO 1
-@@ -127,7 +131,7 @@
- #define __UAPI_DEF_IN_CLASS 1
-
- #define __UAPI_DEF_IN6_ADDR 1
--/* We unconditionally define the in6_addr macros and glibc must
-+/* We unconditionally define the in6_addr macros and the libc must
- * coordinate. */
- #define __UAPI_DEF_IN6_ADDR_ALT 1
- #define __UAPI_DEF_SOCKADDR_IN6 1
-@@ -168,7 +172,7 @@
- /* If we did not see any headers from any supported C libraries,
- * or we are being included in the kernel, then define everything
- * that we need. */
--#else /* !defined(__GLIBC__) */
-+#else /* defined(__KERNEL__) */
-
- /* Definitions for if.h */
- #define __UAPI_DEF_IF_IFCONF 1
-@@ -208,6 +212,6 @@
- /* Definitions for xattr.h */
- #define __UAPI_DEF_XATTR 1
-
--#endif /* __GLIBC__ */
-+#endif /* __KERNEL__ */
-
- #endif /* _UAPI_LIBC_COMPAT_H */
diff --git a/target/linux/generic/pending-4.9/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch b/target/linux/generic/pending-4.9/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch
deleted file mode 100644
index 7b7b403..0000000
--- a/target/linux/generic/pending-4.9/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From: David Heidelberger <david.heidelberger@ixit.cz>
-Subject: uapi/if_ether.h: prevent redefinition of struct ethhdr
-
-Musl provides its own ethhdr struct definition. Add a guard to prevent
-its definition of the appropriate musl header has already been included.
-
-Signed-off-by: John Spencer <maillist-linux@barfooze.de>
-Tested-by: David Heidelberger <david.heidelberger@ixit.cz>
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- include/uapi/linux/if_ether.h | 3 +++
- include/uapi/linux/libc-compat.h | 11 +++++++++++
- 2 files changed, 14 insertions(+)
-
---- a/include/uapi/linux/if_ether.h
-+++ b/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
-@@ -138,11 +139,13 @@
- * 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 */
---- a/include/uapi/linux/libc-compat.h
-+++ b/include/uapi/linux/libc-compat.h
-@@ -89,6 +89,14 @@
-
- #endif /* _NET_IF_H */
-
-+/* musl defines the ethhdr struct itself in its netinet/if_ether.h.
-+ * Glibc just includes the kernel header and uses a different guard. */
-+#if defined(_NETINET_IF_ETHER_H)
-+#define __UAPI_DEF_ETHHDR 0
-+#else
-+#define __UAPI_DEF_ETHHDR 1
-+#endif
-+
- /* Coordinate with libc netinet/in.h header. */
- #if defined(_NETINET_IN_H)
-
-@@ -184,6 +192,9 @@
- /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
- #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
-
-+/* Definitions for if_ether.h */
-+#define __UAPI_DEF_ETHHDR 1
-+
- /* Definitions for in.h */
- #define __UAPI_DEF_IN_ADDR 1
- #define __UAPI_DEF_IN_IPPROTO 1