summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Kinard <kumba@gentoo.org>2017-07-29 16:48:59 -0400
committerJoshua Kinard <kumba@gentoo.org>2017-07-29 16:50:10 -0400
commit347824aee8c54d6668a7e14980af3b46e72a57e7 (patch)
treec69730bf264b94d79ccbef05cb693887b5a7c945 /sys-apps
parentdev-util/radare2: use system-installed capstone, bug #592220 (diff)
downloadgentoo-347824aee8c54d6668a7e14980af3b46e72a57e7.tar.gz
gentoo-347824aee8c54d6668a7e14980af3b46e72a57e7.tar.bz2
gentoo-347824aee8c54d6668a7e14980af3b46e72a57e7.zip
sys-apps/iproute2: Fix compile error w/ sys-libs/uclibc-ng
Local compatibility fix for sys-apps/iproute2-4.12.0 under a sys-libs/uclibc-ng system where netinet/in.h is missing a definition for 'IPPROTO_MH'. Signed-off-by: Joshua Kinard <kumba@gentoo.org> Package-Manager: Portage-2.3.6, Repoman-2.3.3
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch38
-rw-r--r--sys-apps/iproute2/iproute2-4.12.0.ebuild8
2 files changed, 46 insertions, 0 deletions
diff --git a/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch b/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch
new file mode 100644
index 000000000000..48cae701438e
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch
@@ -0,0 +1,38 @@
+From 2ac2f416072d9968a9ea2dd9f48168223a1147b0 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Tue, 18 Jul 2017 14:09:06 +0300
+Subject: [PATCH] Fix build with uClibc-ng
+
+Add a local definition for IPPROTO_MH to fix build with uClibc-ng. As of
+version 1.0.25, the uClibc-ng netinet/in.h header does not provide this
+definition. The kernel provided definition is masked by libc-compat.h. Add
+this local fix until uClibc-ng syncs netinet/in.h with glibc.
+
+This partially reverts upstream commit a9ae195a2169 (xfrm: get #define's from
+linux includes)
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: non upstreamable; local uClibc-ng compatibility fix
+---
+ ip/xfrm.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ip/xfrm.h b/ip/xfrm.h
+index 54d80ce5e949..50b85550fb45 100644
+--- a/ip/xfrm.h
++++ b/ip/xfrm.h
+@@ -30,6 +30,10 @@
+ #include <linux/xfrm.h>
+ #include <linux/ipsec.h>
+
++#ifndef IPPROTO_MH
++# define IPPROTO_MH 135
++#endif
++
+ #define XFRMS_RTA(x) ((struct rtattr*)(((char*)(x)) + NLMSG_ALIGN(sizeof(struct xfrm_usersa_info))))
+ #define XFRMS_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct xfrm_usersa_info))
+
+--
+2.13.2
+
diff --git a/sys-apps/iproute2/iproute2-4.12.0.ebuild b/sys-apps/iproute2/iproute2-4.12.0.ebuild
index 92f6ddaa6ff4..3443e720d929 100644
--- a/sys-apps/iproute2/iproute2-4.12.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.12.0.ebuild
@@ -51,6 +51,14 @@ src_prepare() {
)
fi
+ # Local uclibc-ng compat fix until uclibc-ng upstream can sync
+ # netinet/in.h with glibc. Resolves #626546.
+ if use elibc_uclibc ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.12.0-uclibc-ng-add-ipproto_mh.patch
+ )
+ fi
+
epatch "${PATCHES[@]}"
sed -i \