From: Jozsef Kadlecsik Date: Mon, 22 Oct 2018 18:47:35 +0000 (+0200) Subject: Add compatibility support for async in pernet_operations. X-Git-Tag: v7.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01b198d0a734ebadcd8d3cfcb2201e79bef448bd;p=thirdparty%2Fipset.git Add compatibility support for async in pernet_operations. --- diff --git a/configure.ac b/configure.ac index 7d0fa019..1532997d 100644 --- a/configure.ac +++ b/configure.ac @@ -363,6 +363,16 @@ else AC_SUBST(HAVE_NET_OPS_ID, undef) fi +AC_MSG_CHECKING([kernel source for async in struct pernet_operations]) +if test -f $ksourcedir/include/net/net_namespace.h && \ + $AWK '/^struct pernet_operations /,/^}/' $ksourcedir/include/net/net_namespace.h | $GREP -q 'bool async;'; then + AC_MSG_RESULT(yes) + AC_SUBST(HAVE_NET_OPS_ASYNC, define) +else + AC_MSG_RESULT(no) + AC_SUBST(HAVE_NET_OPS_ASYNC, undef) +fi + AC_MSG_CHECKING([kernel source for user_ns in struct net]) if test -f $ksourcedir/include/net/net_namespace.h && \ $AWK '/^struct net \{/,/^}/' $ksourcedir/include/net/net_namespace.h | $GREP -q 'user_ns'; then diff --git a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in index 53bd5887..b93d662e 100644 --- a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in +++ b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in @@ -21,6 +21,7 @@ #@HAVE_CHECKENTRY_BOOL@ HAVE_CHECKENTRY_BOOL #@HAVE_XT_TARGET_PARAM@ HAVE_XT_TARGET_PARAM #@HAVE_NET_OPS_ID@ HAVE_NET_OPS_ID +#@HAVE_NET_OPS_ASYNC@ HAVE_NET_OPS_ASYNC #@HAVE_USER_NS_IN_STRUCT_NET@ HAVE_USER_NS_IN_STRUCT_NET #@HAVE_RBTREE_POSTORDER_FOR_EACH_ENTRY_SAFE@ HAVE_RBTREE_POSTORDER_FOR_EACH_ENTRY_SAFE #@HAVE_KVCALLOC@ HAVE_KVCALLOC