RHEL7 backported nf_hookfn from newer kernel. Handle compatibility by checking nf_hookfn declaration.
Signed-off-by: Pravin B Shelar <pshe...@nicira.com> --- acinclude.m4 | 2 ++ datapath/linux/compat/stt.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 51cc969..e9d0ed9 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -325,6 +325,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [can_checksum_protocol]) OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [netdev_features_t]) OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [pcpu_sw_netstats]) + OVS_GREP_IFELSE([$KSRC/include/linux/netfilter.h], [nf_hookfn.*nf_hook_ops], + [OVS_DEFINE([HAVE_NF_HOOKFN_ARG_OPS])]) OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32]) diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c index d68d10e..b44f470 100644 --- a/datapath/linux/compat/stt.c +++ b/datapath/linux/compat/stt.c @@ -1318,7 +1318,7 @@ static void clean_percpu(struct work_struct *work) schedule_clean_percpu(); } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0) +#ifdef HAVE_NF_HOOKFN_ARG_OPS #define FIRST_PARAM const struct nf_hook_ops *ops, #else #define FIRST_PARAM unsigned int hooknum, -- 1.7.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev