1 |
commit: f569763b63e3d0159bfb297d295d970e4a890d3c |
2 |
Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Feb 20 11:31:42 2018 +0000 |
4 |
Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 2 17:11:37 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f569763b |
7 |
|
8 |
sys-cluster/keepalived: fix building with linux-headers-4.15 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/648252 |
11 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
12 |
|
13 |
...ived-fix-building-with-linux-headers-4.15.patch | 54 ++++++++++++++++++++++ |
14 |
sys-cluster/keepalived/keepalived-1.4.2.ebuild | 4 ++ |
15 |
2 files changed, 58 insertions(+) |
16 |
|
17 |
diff --git a/sys-cluster/keepalived/files/keepalived-fix-building-with-linux-headers-4.15.patch b/sys-cluster/keepalived/files/keepalived-fix-building-with-linux-headers-4.15.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..542b1554ac0 |
20 |
--- /dev/null |
21 |
+++ b/sys-cluster/keepalived/files/keepalived-fix-building-with-linux-headers-4.15.patch |
22 |
@@ -0,0 +1,54 @@ |
23 |
+From 947248af144bcab6376ccddab8dc40f313b14281 Mon Sep 17 00:00:00 2001 |
24 |
+From: Baruch Siach <baruch@×××××××.il> |
25 |
+Date: Fri, 9 Feb 2018 11:55:19 +0200 |
26 |
+Subject: [PATCH] Fix build with Linux kernel headers v4.15 |
27 |
+ |
28 |
+Linux kernel version 4.15 changed the libc/kernel headers suppression |
29 |
+logic in a way that introduces collisions: |
30 |
+ |
31 |
+In file included from ./../include/vrrp_ipaddress.h:32:0, |
32 |
+ from ./../include/vrrp_arp.h:31, |
33 |
+ from vrrp.c:29: |
34 |
+/home/peko/autobuild/instance-1/output/host/arc-buildroot-linux-uclibc/sysroot/usr/include/linux/in.h:29:3: error: redeclaration of enumerator 'IPPROTO_IP' |
35 |
+ IPPROTO_IP = 0, /* Dummy protocol for TCP */ |
36 |
+ ^ |
37 |
+/home/peko/autobuild/instance-1/output/host/arc-buildroot-linux-uclibc/sysroot/usr/include/netinet/in.h:33:5: note: previous definition of 'IPPROTO_IP' was here |
38 |
+ IPPROTO_IP = 0, /* Dummy protocol for TCP. */ |
39 |
+ ^~~~~~~~~~ |
40 |
+ |
41 |
+Include the libc netinet/in.h header first to suppress the kernel |
42 |
+header. |
43 |
+ |
44 |
+In addition, add _GNU_SOURCE to vrrp.c for the libc provided in6_pktinfo |
45 |
+definition. |
46 |
+ |
47 |
+Signed-off-by: Baruch Siach <baruch@×××××××.il> |
48 |
+--- |
49 |
+ keepalived/include/vrrp_arp.h | 1 + |
50 |
+ keepalived/vrrp/vrrp.c | 1 + |
51 |
+ 2 files changed, 2 insertions(+) |
52 |
+ |
53 |
+diff --git a/keepalived/include/vrrp_arp.h b/keepalived/include/vrrp_arp.h |
54 |
+index c2b4e6b5..9dd68f63 100644 |
55 |
+--- a/keepalived/include/vrrp_arp.h |
56 |
++++ b/keepalived/include/vrrp_arp.h |
57 |
+@@ -24,6 +24,7 @@ |
58 |
+ #define _VRRP_ARP_H |
59 |
+ |
60 |
+ /* system includes */ |
61 |
++#include <netinet/in.h> |
62 |
+ #include <net/ethernet.h> |
63 |
+ #include <net/if_arp.h> |
64 |
+ |
65 |
+diff --git a/keepalived/vrrp/vrrp.c b/keepalived/vrrp/vrrp.c |
66 |
+index 56395363..eaa9c567 100644 |
67 |
+--- a/keepalived/vrrp/vrrp.c |
68 |
++++ b/keepalived/vrrp/vrrp.c |
69 |
+@@ -26,6 +26,7 @@ |
70 |
+ #include "config.h" |
71 |
+ |
72 |
+ /* local include */ |
73 |
++#define _GNU_SOURCE |
74 |
+ #include "vrrp_arp.h" |
75 |
+ #include "vrrp_ndisc.h" |
76 |
+ #include "vrrp_scheduler.h" |
77 |
|
78 |
diff --git a/sys-cluster/keepalived/keepalived-1.4.2.ebuild b/sys-cluster/keepalived/keepalived-1.4.2.ebuild |
79 |
index 9ec3a8f5d74..6b60cf23060 100644 |
80 |
--- a/sys-cluster/keepalived/keepalived-1.4.2.ebuild |
81 |
+++ b/sys-cluster/keepalived/keepalived-1.4.2.ebuild |
82 |
@@ -30,6 +30,10 @@ DOCS=( |
83 |
doc/keepalived.conf.SYNOPSIS doc/NOTE_vrrp_vmac.txt |
84 |
) |
85 |
|
86 |
+PATCHES=( |
87 |
+ "${FILESDIR}/${PN}-fix-building-with-linux-headers-4.15.patch" |
88 |
+) |
89 |
+ |
90 |
src_prepare() { |
91 |
default |