From 4ce0e942fef15c4f0b27cdb1aa0ab0bef9f81a27 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 18 Jan 2016 13:41:44 +0100 Subject: build: fix kernel include path ip_vs.h should be looked up in linux/ip_vs.h and not net/ip_vs.h, since the later is for the kernel only while the former is correctly packaged with the libc. There is no need for --with-kernel-dir with this fix. [ was 0032-fix-kernel-include-path.diff in 1.1.20 ] --- configure | 12 +----------- configure.in | 2 +- keepalived/include/check_data.h | 2 +- keepalived/include/ipvswrapper.h | 4 ++-- keepalived/libipvs-2.4/libipvs.h | 2 +- 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 95ba428..77baca4 100755 --- a/configure +++ b/configure @@ -3245,14 +3245,6 @@ if test "${enable_vrrp+set}" = set; then : fi -# Check whether --with-kernel-dir was given. -if test "${with_kernel_dir+set}" = set; then : - withval=$with_kernel_dir; kernelinc="$withval/include" kernelpath="$withval" -else - kernelinc="/usr/src/linux/include" kernelpath="/usr/src/linux" -fi - - # Check whether --with-kernel-version was given. if test "${with_kernel_version+set}" = set; then : withval=$with_kernel_version; kernelversion="$withval" @@ -4097,7 +4089,6 @@ fi -CPPFLAGS="$CPPFLAGS -I$kernelinc" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel version" >&5 $as_echo_n "checking for kernel version... " >&6; } if test "$cross_compiling" = yes; then : @@ -4181,7 +4172,7 @@ if test "$enable_lvs" != "no"; then if test "$KERN" = "_KRNL_2_6_"; then IPVS_SUPPORT="_WITH_LVS_" else - ac_fn_c_check_header_mongrel "$LINENO" "net/ip_vs.h" "ac_cv_header_net_ip_vs_h" "$ac_includes_default" + ac_fn_c_check_header_mongrel "$LINENO" "linux/ip_vs.h" "ac_cv_header_net_ip_vs_h" "$ac_includes_default" if test "x$ac_cv_header_net_ip_vs_h" = xyes; then : IPVS_SUPPORT="_WITH_LVS_" else @@ -4232,7 +4223,6 @@ if test "$enable_vrrp" != "no"; then VRRP_SUPPORT="_WITH_VRRP_" fi -CPPFLAGS="$CPPFLAGS -I$kernelinc" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel macvlan support" >&5 $as_echo_n "checking for kernel macvlan support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/configure.in b/configure.in index a61cc3f..a29c7cc 100644 --- a/configure.in +++ b/configure.in @@ -161,7 +161,7 @@ if test "$enable_lvs" != "no"; then if test "$KERN" = "_KRNL_2_6_"; then IPVS_SUPPORT="_WITH_LVS_" else - AC_CHECK_HEADER([net/ip_vs.h], + AC_CHECK_HEADER([linux/ip_vs.h], [IPVS_SUPPORT="_WITH_LVS_"], [ IPVS_SUPPORT="_WITHOUT_LVS_" diff --git a/keepalived/include/check_data.h b/keepalived/include/check_data.h index 4ce4a01..2073daf 100644 --- a/keepalived/include/check_data.h +++ b/keepalived/include/check_data.h @@ -33,7 +33,7 @@ #ifdef _WITH_LVS_ #ifdef _KRNL_2_4_ - #include + #include #elif _KRNL_2_6_ #include "../libipvs-2.6/ip_vs.h" #endif diff --git a/keepalived/include/ipvswrapper.h b/keepalived/include/ipvswrapper.h index 9264e7a..30055ad 100644 --- a/keepalived/include/ipvswrapper.h +++ b/keepalived/include/ipvswrapper.h @@ -40,12 +40,12 @@ #ifdef _WITH_LVS_ #ifdef _KRNL_2_4_ #include "../libipvs-2.4/libipvs.h" - #include + #include #elif _KRNL_2_6_ #include "../libipvs-2.6/ip_vs.h" #include "../libipvs-2.6/libipvs.h" #endif -// #include +// #include #endif #ifndef IP_VS_TEMPLATE_TIMEOUT diff --git a/keepalived/libipvs-2.4/libipvs.h b/keepalived/libipvs-2.4/libipvs.h index 7ff8f0d..ebc839f 100644 --- a/keepalived/libipvs-2.4/libipvs.h +++ b/keepalived/libipvs-2.4/libipvs.h @@ -10,7 +10,7 @@ #ifndef _LIBIPVS_H #define _LIBIPVS_H -#include +#include /* * The default IPVS_SVC_PERSISTENT_TIMEOUT is a little larger than average -- 1.7.12.1