1 |
commit: 347824aee8c54d6668a7e14980af3b46e72a57e7 |
2 |
Author: Joshua Kinard <kumba <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 29 20:48:59 2017 +0000 |
4 |
Commit: Joshua Kinard <kumba <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 29 20:50:10 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=347824ae |
7 |
|
8 |
sys-apps/iproute2: Fix compile error w/ sys-libs/uclibc-ng |
9 |
|
10 |
Local compatibility fix for sys-apps/iproute2-4.12.0 under a |
11 |
sys-libs/uclibc-ng system where netinet/in.h is missing a definition |
12 |
for 'IPPROTO_MH'. |
13 |
|
14 |
Signed-off-by: Joshua Kinard <kumba <AT> gentoo.org> |
15 |
Package-Manager: Portage-2.3.6, Repoman-2.3.3 |
16 |
|
17 |
.../iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch | 38 ++++++++++++++++++++++ |
18 |
sys-apps/iproute2/iproute2-4.12.0.ebuild | 8 +++++ |
19 |
2 files changed, 46 insertions(+) |
20 |
|
21 |
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 |
22 |
new file mode 100644 |
23 |
index 00000000000..48cae701438 |
24 |
--- /dev/null |
25 |
+++ b/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch |
26 |
@@ -0,0 +1,38 @@ |
27 |
+From 2ac2f416072d9968a9ea2dd9f48168223a1147b0 Mon Sep 17 00:00:00 2001 |
28 |
+From: Baruch Siach <baruch@×××××××.il> |
29 |
+Date: Tue, 18 Jul 2017 14:09:06 +0300 |
30 |
+Subject: [PATCH] Fix build with uClibc-ng |
31 |
+ |
32 |
+Add a local definition for IPPROTO_MH to fix build with uClibc-ng. As of |
33 |
+version 1.0.25, the uClibc-ng netinet/in.h header does not provide this |
34 |
+definition. The kernel provided definition is masked by libc-compat.h. Add |
35 |
+this local fix until uClibc-ng syncs netinet/in.h with glibc. |
36 |
+ |
37 |
+This partially reverts upstream commit a9ae195a2169 (xfrm: get #define's from |
38 |
+linux includes) |
39 |
+ |
40 |
+Signed-off-by: Baruch Siach <baruch@×××××××.il> |
41 |
+--- |
42 |
+Upstream status: non upstreamable; local uClibc-ng compatibility fix |
43 |
+--- |
44 |
+ ip/xfrm.h | 4 ++++ |
45 |
+ 1 file changed, 4 insertions(+) |
46 |
+ |
47 |
+diff --git a/ip/xfrm.h b/ip/xfrm.h |
48 |
+index 54d80ce5e949..50b85550fb45 100644 |
49 |
+--- a/ip/xfrm.h |
50 |
++++ b/ip/xfrm.h |
51 |
+@@ -30,6 +30,10 @@ |
52 |
+ #include <linux/xfrm.h> |
53 |
+ #include <linux/ipsec.h> |
54 |
+ |
55 |
++#ifndef IPPROTO_MH |
56 |
++# define IPPROTO_MH 135 |
57 |
++#endif |
58 |
++ |
59 |
+ #define XFRMS_RTA(x) ((struct rtattr*)(((char*)(x)) + NLMSG_ALIGN(sizeof(struct xfrm_usersa_info)))) |
60 |
+ #define XFRMS_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct xfrm_usersa_info)) |
61 |
+ |
62 |
+-- |
63 |
+2.13.2 |
64 |
+ |
65 |
|
66 |
diff --git a/sys-apps/iproute2/iproute2-4.12.0.ebuild b/sys-apps/iproute2/iproute2-4.12.0.ebuild |
67 |
index 92f6ddaa6ff..3443e720d92 100644 |
68 |
--- a/sys-apps/iproute2/iproute2-4.12.0.ebuild |
69 |
+++ b/sys-apps/iproute2/iproute2-4.12.0.ebuild |
70 |
@@ -51,6 +51,14 @@ src_prepare() { |
71 |
) |
72 |
fi |
73 |
|
74 |
+ # Local uclibc-ng compat fix until uclibc-ng upstream can sync |
75 |
+ # netinet/in.h with glibc. Resolves #626546. |
76 |
+ if use elibc_uclibc ; then |
77 |
+ PATCHES+=( |
78 |
+ "${FILESDIR}"/${PN}-4.12.0-uclibc-ng-add-ipproto_mh.patch |
79 |
+ ) |
80 |
+ fi |
81 |
+ |
82 |
epatch "${PATCHES[@]}" |
83 |
|
84 |
sed -i \ |