Update to 2.0.17 OBS-URL: https://build.opensuse.org/request/show/717976 OBS-URL: https://build.opensuse.org/package/show/network/keepalived?expand=0&rev=58
69 lines
2.2 KiB
Diff
69 lines
2.2 KiB
Diff
From 947248af144bcab6376ccddab8dc40f313b14281 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>
|
|
---
|
|
keepalived/include/vrrp_arp.h | 1 +
|
|
keepalived/vrrp/vrrp.c | 1 +
|
|
2 files changed, 2 insertions(+)
|
|
|
|
Index: keepalived/include/vrrp_arp.h
|
|
===================================================================
|
|
--- keepalived/include/vrrp_arp.h.orig
|
|
+++ keepalived/include/vrrp_arp.h
|
|
@@ -24,6 +24,7 @@
|
|
#define _VRRP_ARP_H
|
|
|
|
/* system includes */
|
|
+#include <netinet/in.h>
|
|
#include <sys/types.h>
|
|
#include <linux/if_infiniband.h>
|
|
|
|
Index: keepalived/vrrp/vrrp.c
|
|
===================================================================
|
|
--- keepalived/vrrp/vrrp.c.orig
|
|
+++ keepalived/vrrp/vrrp.c
|
|
@@ -44,6 +44,7 @@
|
|
#endif
|
|
|
|
/* local include */
|
|
+#define _GNU_SOURCE
|
|
#include "parser.h"
|
|
|
|
#include "vrrp_arp.h"
|
|
Index: keepalived/include/vrrp_if.h
|
|
===================================================================
|
|
--- keepalived/include/vrrp_if.h.orig
|
|
+++ keepalived/include/vrrp_if.h
|
|
@@ -33,9 +33,7 @@
|
|
#include <sys/types.h>
|
|
#include <net/if.h>
|
|
#include <stdio.h>
|
|
-#ifdef _HAVE_NET_LINUX_IF_H_COLLISION_
|
|
#define _LINUX_IF_H
|
|
-#endif
|
|
#include <linux/netdevice.h>
|
|
#ifdef _HAVE_VRRP_VMAC_
|
|
#include <linux/if_link.h>
|