- add linux-4.15.patch
OBS-URL: https://build.opensuse.org/package/show/network/keepalived?expand=0&rev=43
This commit is contained in:
parent
5f5ed9e175
commit
2627baaa6d
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 22 10:07:17 UTC 2018 - dmueller@suse.com
|
||||
|
||||
- add linux-4.15.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 21 14:52:29 UTC 2018 - dmueller@suse.com
|
||||
|
||||
|
@ -39,6 +39,8 @@ Url: http://www.keepalived.org/
|
||||
Source: http://www.keepalived.org/software/%{name}-%{version}.tar.gz
|
||||
Source2: keepalive-rpmlintrc
|
||||
Patch1: keepalive-init.patch
|
||||
# PATCH-FIX-UPSTREAM: https://github.com/acassen/keepalived/commit/947248af144bcab6376ccddab8dc40f313b14281.patch
|
||||
Patch2: linux-4.15.patch
|
||||
BuildRequires: libnfnetlink-devel
|
||||
%if %{with json}
|
||||
BuildRequires: libjson-c-devel
|
||||
@ -94,6 +96,7 @@ resilient infrastructures.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
chmod 644 doc/samples/*
|
||||
|
||||
%build
|
||||
|
54
linux-4.15.patch
Normal file
54
linux-4.15.patch
Normal file
@ -0,0 +1,54 @@
|
||||
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(+)
|
||||
|
||||
diff --git a/keepalived/include/vrrp_arp.h b/keepalived/include/vrrp_arp.h
|
||||
index c2b4e6b5..9dd68f63 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 56395363..eaa9c567 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"
|
Loading…
x
Reference in New Issue
Block a user