You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.5 KiB

  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. Issue #1516 reported by the OpenWRT project identified that
  6. keepalived_modprobe() was not defined if --disable-libipvs-dynamic
  7. was specified.
  8. Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
  9. ---
  10. lib/utils.c | 4 ++--
  11. lib/utils.h | 2 +-
  12. 2 files changed, 3 insertions(+), 3 deletions(-)
  13. diff --git a/lib/utils.c b/lib/utils.c
  14. index 009da0ce..7f16f444 100644
  15. --- a/lib/utils.c
  16. +++ b/lib/utils.c
  17. @@ -34,7 +34,7 @@
  18. #include <stdint.h>
  19. #include <errno.h>
  20. #include <sys/prctl.h>
  21. -#if defined _WITH_LVS_ || defined _LIBIPSET_DYNAMIC_
  22. +#if defined _WITH_LVS_ || defined _HAVE_LIBIPSET_
  23. #include <sys/wait.h>
  24. #endif
  25. #ifdef _WITH_PERF_
  26. @@ -1097,7 +1097,7 @@ memcmp_constant_time(const void *s1, const void *s2, size_t n)
  27. * Utility functions coming from Wensong code
  28. */
  29. -#if defined _WITH_LVS_ || defined _LIBIPSET_DYNAMIC_
  30. +#if defined _WITH_LVS_ || defined _HAVE_LIBIPSET_
  31. static char*
  32. get_modprobe(void)
  33. {
  34. diff --git a/lib/utils.h b/lib/utils.h
  35. index 66d64d9f..22325023 100644
  36. --- a/lib/utils.h
  37. +++ b/lib/utils.h
  38. @@ -263,7 +263,7 @@ extern int open_pipe(int [2]);
  39. #endif
  40. extern int memcmp_constant_time(const void *, const void *, size_t);
  41. -#if defined _WITH_LVS_ || defined _LIBIPSET_DYNAMIC_
  42. +#if defined _WITH_LVS_ || defined _HAVE_LIBIPSET_
  43. extern bool keepalived_modprobe(const char *);
  44. #endif
  45. --
  46. 2.20.1