c555c50
From 300b460970f538ab515835f14650785e88808a8f Mon Sep 17 00:00:00 2001
c555c50
From: Sam James <sam@gentoo.org>
c555c50
Date: Fri, 4 Nov 2022 04:04:46 +0000
c555c50
Subject: acinclude.m4: fix -Wimplicit-function-declaration
c555c50
c555c50
-Wimplicit-function-declaration will become an error by default
c555c50
in Clang 16.
c555c50
c555c50
Fixes errors like:
c555c50
```
c555c50
error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
c555c50
```
c555c50
c555c50
Signed-off-by: Sam James <sam@gentoo.org>
c555c50
c555c50
DJ: Added pre-configure'd configure
c555c50
c555c50
diff --git a/acinclude.m4 b/acinclude.m4
c555c50
index df8abe148..71e22c8d4 100644
c555c50
--- a/acinclude.m4
c555c50
+++ b/acinclude.m4
c555c50
@@ -471,6 +471,7 @@ AC_DEFUN([SANE_CHECK_IPV6],
c555c50
   if test "$ipv6" != "no" ; then
c555c50
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
c555c50
 	#define INET6
c555c50
+	#include <stdlib.h>
c555c50
 	#include <sys/types.h>
c555c50
 	#include <sys/socket.h> ]], [[
c555c50
 	 /* AF_INET6 available check */
c555c50
@@ -492,6 +493,7 @@ AC_DEFUN([SANE_CHECK_IPV6],
c555c50
     AC_MSG_CHECKING([whether struct sockaddr_storage has an ss_family member])
c555c50
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
c555c50
 	#define INET6
c555c50
+	#include <stdlib.h>
c555c50
 	#include <sys/types.h>
c555c50
 	#include <sys/socket.h> ]], [[
c555c50
 	/* test if the ss_family member exists in struct sockaddr_storage */
c555c50
@@ -504,6 +506,7 @@ AC_DEFUN([SANE_CHECK_IPV6],
c555c50
     ], [
c555c50
 		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
c555c50
 		#define INET6
c555c50
+		#include <stdlib.h>
c555c50
 		#include <sys/types.h>
c555c50
 		#include <sys/socket.h> ]], [[
c555c50
 		/* test if the __ss_family member exists in struct sockaddr_storage */
c555c50
diff -rup a/configure b/configure
c555c50
--- a/configure	2023-02-05 21:12:47.000000000 -0500
c555c50
+++ b/configure	2023-02-20 21:21:46.496776406 -0500
c555c50
@@ -25824,6 +25824,7 @@ fi
c555c50
 /* end confdefs.h.  */
c555c50
 
c555c50
 	#define INET6
c555c50
+	#include <stdlib.h>
c555c50
 	#include <sys/types.h>
c555c50
 	#include <sys/socket.h>
c555c50
 int
c555c50
@@ -25866,6 +25867,7 @@ $as_echo_n "checking whether struct sock
c555c50
 /* end confdefs.h.  */
c555c50
 
c555c50
 	#define INET6
c555c50
+	#include <stdlib.h>
c555c50
 	#include <sys/types.h>
c555c50
 	#include <sys/socket.h>
c555c50
 int
c555c50
@@ -25895,6 +25897,7 @@ else
c555c50
 /* end confdefs.h.  */
c555c50
 
c555c50
 		#define INET6
c555c50
+		#include <stdlib.h>
c555c50
 		#include <sys/types.h>
c555c50
 		#include <sys/socket.h>
c555c50
 int