summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2019-06-11 08:16:49 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2019-06-11 08:16:49 -0700
commitede368ab38940671c718a6b77aa97d52736cad6f (patch)
tree8671611a2fa5c9eee7bcbc50206290245a113c70 /sys-apps
parentlinux-mod.eclass: Add support for kernels >=3.X in convert_to_m (diff)
downloadgentoo-ede368ab38940671c718a6b77aa97d52736cad6f.tar.gz
gentoo-ede368ab38940671c718a6b77aa97d52736cad6f.tar.bz2
gentoo-ede368ab38940671c718a6b77aa97d52736cad6f.zip
sys-apps/iproute2: musl compilefix
Package-Manager: Portage-2.3.67, Repoman-2.3.12 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/iproute2/files/iproute2-5.1.0-portability.patch32
-rw-r--r--sys-apps/iproute2/iproute2-5.1.0.ebuild1
2 files changed, 33 insertions, 0 deletions
diff --git a/sys-apps/iproute2/files/iproute2-5.1.0-portability.patch b/sys-apps/iproute2/files/iproute2-5.1.0-portability.patch
new file mode 100644
index 000000000000..e704f65c113f
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.1.0-portability.patch
@@ -0,0 +1,32 @@
+From 202d79fcf4e184818bd074f8c06e94e700670898 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 11 Jun 2019 01:48:01 -0500
+Subject: [PATCH] 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. so for now, only include it on glibc in order
+ not to break their headers.
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+---
+ include/uapi/linux/kernel.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
+index d99ffa1..f917115 100644
+--- a/include/uapi/linux/kernel.h
++++ b/include/uapi/linux/kernel.h
+@@ -2,7 +2,9 @@
+ #ifndef _LINUX_KERNEL_H
+ #define _LINUX_KERNEL_H
+
++#ifdef __GLIBC__
+ #include <linux/sysinfo.h>
++#endif
+
+ /*
+ * 'kernel.h' contains some often-used function prototypes etc
+--
+2.22.0
diff --git a/sys-apps/iproute2/iproute2-5.1.0.ebuild b/sys-apps/iproute2/iproute2-5.1.0.ebuild
index 5db7d040eeee..f2771e5b49e4 100644
--- a/sys-apps/iproute2/iproute2-5.1.0.ebuild
+++ b/sys-apps/iproute2/iproute2-5.1.0.ebuild
@@ -47,6 +47,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
"${FILESDIR}"/${PN}-4.20.0-configure-nomagic.patch # bug 643722
+ "${FILESDIR}"/${PN}-5.1.0-portability.patch
)
src_prepare() {