You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.4 KiB
40 lines
1.4 KiB
3 months ago
|
From 1b11bd195088a47ecc04f801edc1ff8d58a1462f Mon Sep 17 00:00:00 2001
|
||
|
From: Peter Fordham <peter.fordham@gmail.com>
|
||
|
Date: Tue, 10 Jan 2023 23:02:18 +0100
|
||
|
Subject: [PATCH] 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>
|
||
|
(cherry picked from commit dafcf4a4199f99779ba3d700ec3b046762410205)
|
||
|
---
|
||
|
configure.ac | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/configure.ac b/configure.ac
|
||
|
index 9ae6cc6c742d1..24990ab977531 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.])
|