Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] keepalived: fix build with 4.15+ kernel headers
@ 2018-02-09 10:12 Baruch Siach
  2018-02-10  8:00 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Baruch Siach @ 2018-02-09 10:12 UTC (permalink / raw)
  To: buildroot

Kernel version 4.15 change the logic of libc-compat.h in a way that
introduced libc/kernel network headers collision. Add a patch for fixing
that.

Fixes:
http://autobuild.buildroot.net/results/000/000293275076c59e298d235e93ce9a92b66360e7/
http://autobuild.buildroot.net/results/2ba/2ba8722a42aa9b92f5194595f53130c97647b9b8/
http://autobuild.buildroot.net/results/114/114136447c9b18436ff9b2804c440a2e37576452/

Cc: Ilias Apalodimas <apalos@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 ...Fix-build-with-Linux-kernel-headers-v4.15.patch | 59 ++++++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 package/keepalived/0001-Fix-build-with-Linux-kernel-headers-v4.15.patch

diff --git a/package/keepalived/0001-Fix-build-with-Linux-kernel-headers-v4.15.patch b/package/keepalived/0001-Fix-build-with-Linux-kernel-headers-v4.15.patch
new file mode 100644
index 000000000000..b5f21cb40a47
--- /dev/null
+++ b/package/keepalived/0001-Fix-build-with-Linux-kernel-headers-v4.15.patch
@@ -0,0 +1,59 @@
+From 15f93dd90484532e25c8f3e43fb34a361a79d7f2 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Fri, 9 Feb 2018 11:55:19 +0200
+Subject: [PATCH] Fix build with Linux kernel headers v4.15
+
+Linux kernel version 4.15 changed the libc/kernel headers suppression
+logic in a way that introduces collisions:
+
+In file included from ./../include/vrrp_ipaddress.h:32:0,
+                 from ./../include/vrrp_arp.h:31,
+                 from vrrp.c:29:
+/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'
+   IPPROTO_IP = 0,  /* Dummy protocol for TCP  */
+   ^
+/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
+     IPPROTO_IP = 0,    /* Dummy protocol for TCP.  */
+     ^~~~~~~~~~
+
+Include the libc netinet/in.h header first to suppress the kernel
+header.
+
+In addition, add _GNU_SOURCE to vrrp.c for the libc provided in6_pktinfo
+definition.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: https://github.com/acassen/keepalived/pull/777
+
+ keepalived/include/vrrp_arp.h | 1 +
+ keepalived/vrrp/vrrp.c        | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/keepalived/include/vrrp_arp.h b/keepalived/include/vrrp_arp.h
+index 77a26c450b12..a103ab075c1d 100644
+--- a/keepalived/include/vrrp_arp.h
++++ b/keepalived/include/vrrp_arp.h
+@@ -24,6 +24,7 @@
+ #define _VRRP_ARP_H
+ 
+ /* system includes */
++#include <netinet/in.h>
+ #include <net/ethernet.h>
+ #include <net/if_arp.h>
+ 
+diff --git a/keepalived/vrrp/vrrp.c b/keepalived/vrrp/vrrp.c
+index 3d2bfe41ab4f..435a4b54b2a9 100644
+--- a/keepalived/vrrp/vrrp.c
++++ b/keepalived/vrrp/vrrp.c
+@@ -26,6 +26,7 @@
+ #include "config.h"
+ 
+ /* local include */
++#define _GNU_SOURCE
+ #include "vrrp_arp.h"
+ #include "vrrp_ndisc.h"
+ #include "vrrp_scheduler.h"
+-- 
+2.15.1
+
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] keepalived: fix build with 4.15+ kernel headers
  2018-02-09 10:12 [Buildroot] [PATCH] keepalived: fix build with 4.15+ kernel headers Baruch Siach
@ 2018-02-10  8:00 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-02-10  8:00 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri,  9 Feb 2018 12:12:33 +0200, Baruch Siach wrote:
> Kernel version 4.15 change the logic of libc-compat.h in a way that
> introduced libc/kernel network headers collision. Add a patch for fixing
> that.
> 
> Fixes:
> http://autobuild.buildroot.net/results/000/000293275076c59e298d235e93ce9a92b66360e7/
> http://autobuild.buildroot.net/results/2ba/2ba8722a42aa9b92f5194595f53130c97647b9b8/
> http://autobuild.buildroot.net/results/114/114136447c9b18436ff9b2804c440a2e37576452/
> 
> Cc: Ilias Apalodimas <apalos@gmail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  ...Fix-build-with-Linux-kernel-headers-v4.15.patch | 59 ++++++++++++++++++++++
>  1 file changed, 59 insertions(+)
>  create mode 100644 package/keepalived/0001-Fix-build-with-Linux-kernel-headers-v4.15.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-10  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-09 10:12 [Buildroot] [PATCH] keepalived: fix build with 4.15+ kernel headers Baruch Siach
2018-02-10  8:00 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox