mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-06-12 16:18:42 +02:00
Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at> Closes: https://bugs.gentoo.org/446472 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
From c7c344302d81a36b20d3d26a3d13367c8ed2c80d Mon Sep 17 00:00:00 2001
|
|
From: Florian Weimer <fweimer@redhat.com>
|
|
Date: Tue, 10 Jan 2023 12:31:03 +0100
|
|
Subject: [PATCH 1/2] configure.in: C99 compatibility fix
|
|
|
|
Avoid implicit declarations of inet_pton, exit. Include <arpa/inet.h>
|
|
for the glibc declaration. Return from main instead of calling exit.
|
|
This avoids compilation errors with future compilers.
|
|
---
|
|
configure.in | 9 ++++++---
|
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/configure.in b/configure.in
|
|
index f1cdd10..678fe7d 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -119,7 +119,7 @@ AC_CHECK_LIB(inet6, main,
|
|
AC_CHECK_FUNCS(memcpy strtol)
|
|
AC_CHECK_FUNCS(strcasecmp strncasecmp getopt_long)
|
|
AC_HEADER_STDC([])
|
|
-AC_CHECK_HEADERS(sys/types.h sys/socket.h netinet/in.h netdb.h sys/time.h sys/stat.h sys/fcntl.h malloc.h locale.h stdint.h inttypes.h idna.h)
|
|
+AC_CHECK_HEADERS(sys/types.h sys/socket.h netinet/in.h netdb.h sys/time.h sys/stat.h sys/fcntl.h malloc.h locale.h stdint.h inttypes.h idna.h arpa/inet.h)
|
|
AC_HEADER_TIME
|
|
|
|
|
|
@@ -139,13 +139,16 @@ AC_TRY_RUN(
|
|
#ifdef HAVE_NETINET_IN_H
|
|
#include <netinet/in.h>
|
|
#endif
|
|
+#ifdef HAVE_ARPA_INET_H
|
|
+#include <arpa/inet.h>
|
|
+#endif
|
|
int main()
|
|
{
|
|
struct in6_addr addr6;
|
|
if (inet_pton(AF_INET6, "::1", &addr6) < 1)
|
|
- exit(1);
|
|
+ return 1;
|
|
else
|
|
- exit(0);
|
|
+ return 0;
|
|
}
|
|
], [
|
|
AC_MSG_RESULT(yes)
|