summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Fordham <peter.fordham@gmail.com>2023-01-10 23:02:18 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2023-01-10 23:07:54 +0100
commitdafcf4a4199f99779ba3d700ec3b046762410205 (patch)
tree790cb628eea7aeb5957981777f05a79188c3d9b8
parent3ee08a91b35f050e4ccbaa3f641cf4e23d1a6d33 (diff)
configure: C99 compatibility issues
As part of this effort: https://fedoraproject.org/wiki/Toolchain/PortingToModernC I've found an issue with one of the autoconf checks in the conntrack package. It uses the exit functions without including stdlib. This is deprecated in C99 because it no longer allows implicit function declarations. Find attached a patch that changes the check to use return instead of exit. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1654 Signed-off-by: Peter Fordham <peter.fordham@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--configure.ac4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 5cc0699..3512794 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,9 +54,9 @@ int main()
struct in6_addr addr6;
char buf[128];
if (inet_ntop(AF_INET6, &addr6, buf, 128) == 0 && errno == EAFNOSUPPORT)
- exit(1);
+ return 1;
else
- exit(0);
+ return 0;
}
]])],[ AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_INET_NTOP_IPV6, 1, [Define to 1 if inet_ntop supports IPv6.])