summaryrefslogtreecommitdiff
blob: d8529490cd1e62ec9e992c0925ffd4a4a1c42534 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Fix compilation with clang-16

aclocal.m4 contains code that no longer compiles: missing headers and missing
return types.

--- a/autoconf_local/aclocal.m4
+++ b/autoconf_local/aclocal.m4
@@ -3057,6 +3057,7 @@
 #include <sys/uio.h>
 #include <sys/socket.h>
 #include <sys/un.h>
+#include <string.h>
 ],[
 struct sockaddr_un uaddr;
 
@@ -3285,6 +3286,7 @@
 #ifdef HAVE_RESOLV_H
 #	include <resolv.h>
 #endif
+#include <string.h>
 ],[
 	/* function-body */
 	int len;
@@ -3363,6 +3365,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 		 
+			int
 			main(int argc, char **argv)
 			{
 				/* Note:  don't actually call readline,
@@ -5145,6 +5148,7 @@
 #ifdef HAVE_STDLIB_H
 #	include <stdlib.h>
 #endif
+#include <string.h>
 
 #ifdef HAVE_NCURSES_H
 #	define NCURSES_OPAQUE 0
@@ -5176,6 +5180,7 @@
 #endif
 
  
+int
 main(int argc, char **argv)
 {
 	/* Note:  don't actually call curses, since it may block;
@@ -6510,7 +6515,6 @@
 #endif
 #endif			/* MG */
 
-int
 int  main(void)
 {
 	char *data, *data2, *data3;
@@ -6607,8 +6611,9 @@
 	AC_CACHE_CHECK(whether setvbuf arguments are reversed,
 	  ac_cv_func_setvbuf_reversed,
 	[AC_TRY_RUN([#include <stdio.h>
+	$include <stdlib.h>
 	/* If setvbuf has the reversed format, exit 0. */
-	main () {
+	int main (void) {
 	  /* This call has the arguments reversed.
 	     A reversed system may check and see that the address of main
 	     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */