Merge pull request #11353 from kvuorine/fwknop-fixes
[feed/packages.git] / net / keepalived / patches / 0001-Fix-building-with-disable-libipvs-dynamic.patch
1 From 42c020aab6e51d09f22a2e4a33ce6fd73009e2dc Mon Sep 17 00:00:00 2001
2 From: Quentin Armitage <quentin@armitage.org.uk>
3 Date: Wed, 4 Mar 2020 12:21:43 +0000
4 Subject: [PATCH] Fix building with --disable-libipvs-dynamic
5
6 Issue #1516 reported by the OpenWRT project identified that
7 keepalived_modprobe() was not defined if --disable-libipvs-dynamic
8 was specified.
9
10 Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
11 ---
12 lib/utils.c | 4 ++--
13 lib/utils.h | 2 +-
14 2 files changed, 3 insertions(+), 3 deletions(-)
15
16 diff --git a/lib/utils.c b/lib/utils.c
17 index 009da0ce..7f16f444 100644
18 --- a/lib/utils.c
19 +++ b/lib/utils.c
20 @@ -34,7 +34,7 @@
21 #include <stdint.h>
22 #include <errno.h>
23 #include <sys/prctl.h>
24 -#if defined _WITH_LVS_ || defined _LIBIPSET_DYNAMIC_
25 +#if defined _WITH_LVS_ || defined _HAVE_LIBIPSET_
26 #include <sys/wait.h>
27 #endif
28 #ifdef _WITH_PERF_
29 @@ -1097,7 +1097,7 @@ memcmp_constant_time(const void *s1, const void *s2, size_t n)
30 * Utility functions coming from Wensong code
31 */
32
33 -#if defined _WITH_LVS_ || defined _LIBIPSET_DYNAMIC_
34 +#if defined _WITH_LVS_ || defined _HAVE_LIBIPSET_
35 static char*
36 get_modprobe(void)
37 {
38 diff --git a/lib/utils.h b/lib/utils.h
39 index 66d64d9f..22325023 100644
40 --- a/lib/utils.h
41 +++ b/lib/utils.h
42 @@ -263,7 +263,7 @@ extern int open_pipe(int [2]);
43 #endif
44 extern int memcmp_constant_time(const void *, const void *, size_t);
45
46 -#if defined _WITH_LVS_ || defined _LIBIPSET_DYNAMIC_
47 +#if defined _WITH_LVS_ || defined _HAVE_LIBIPSET_
48 extern bool keepalived_modprobe(const char *);
49 #endif
50
51 --
52 2.20.1
53