From dafcf4a4199f99779ba3d700ec3b046762410205 Mon Sep 17 00:00:00 2001 From: Peter Fordham Date: Tue, 10 Jan 2023 23:02:18 +0100 Subject: 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 Signed-off-by: Pablo Neira Ayuso --- configure.ac | 4 ++-- 1 file 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.]) -- cgit v1.2.1