]> granicus.if.org Git - ipset/commitdiff
configure.ac: Fix build regression on RHEL/CentOS/SL
authorSerhey Popovych <serhe.popovych@gmail.com>
Sun, 18 Nov 2018 19:08:23 +0000 (21:08 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Mon, 26 Nov 2018 10:03:26 +0000 (11:03 +0100)
This was introduced with commit 0f82228387ae ("Use more robust awk
patterns to check for backward compatibility") on RHEL 7.3+ because
it's kernel contains backported upstream commit 633c9a840d0b
("netfilter: nfnetlink: avoid recurrent netns lookups in call_batch")
that introduces @net of @struct net type parameter matched with $GREP
after $AWK returns whole @struct nfnl_callback.

This causes incorrect IPSET_CBFN() prototype choose for ->call()
of @struct nfnl_callback producing following warnings during the build:

  .../ipset/ip_set_core.c:2007:3: warning: initialization from
  incompatible pointer type [enabled by default]
     .call  = ip_set_destroy,
     ^
  ../ipset/ip_set_core.c:2007:3: warning: (near initialization
  for ‘ip_set_netlink_subsys_cb[3].call’) [enabled by default]

Fix by matching pattern to the end of first function pointer in
@struct nfnl_callback instead of end of struct.

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
configure.ac

index 5a74e6ebf92ecefece9ceed3678b064950e8db3a..f5705918484a6e614e80388c3d5987662e58b819 100644 (file)
@@ -496,9 +496,9 @@ else
        AC_SUBST(HAVE_NLA_PUT_IN_ADDR, undef)
 fi
 
-AC_MSG_CHECKING([kernel source for struct net in struct nfnl_callback])
+AC_MSG_CHECKING([kernel source for struct net in the call() function in struct nfnl_callback])
 if test -f $ksourcedir/include/linux/netfilter/nfnetlink.h && \
-   $AWK '/^struct nfnl_callback /,/^}/' $ksourcedir/include/linux/netfilter/nfnetlink.h | \
+   $AWK '/^struct nfnl_callback /,/\);$/' $ksourcedir/include/linux/netfilter/nfnetlink.h | \
    $GREP -q 'struct net'; then
        AC_MSG_RESULT(yes)
        AC_SUBST(HAVE_NET_IN_NFNL_CALLBACK_FN, define)