summaryrefslogtreecommitdiff
blob: 2244b07a14ff5d3d3fb7a0a4a4252a386399845d (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
https://bugs.gentoo.org/870004

Fixed upstream, hopefully (it's hard to keep track of 1.7.x branch churn):
- https://bz.apache.org/bugzilla/show_bug.cgi?id=64753
- https://bz.apache.org/bugzilla/show_bug.cgi?id=65087
--- a/build/apr_common.m4
+++ b/build/apr_common.m4
@@ -467,6 +467,7 @@ changequote([, ])dnl
 AC_MSG_CHECKING(size of $2)
 AC_CACHE_VAL(AC_CV_NAME,
 [AC_TRY_RUN([#include <stdio.h>
+#include <stdlib.h>
 $1
 #ifdef WIN32
 #define binmode "b"
@@ -531,7 +532,8 @@ AC_TRY_RUN([
 #include <errno.h>
 #include <string.h>
 #include <stdio.h>
-main()
+#include <stdlib.h>
+int main()
 {
   char buf[1024];
   if (strerror_r(ERANGE, buf, sizeof buf) < 1) {
--- a/build/apr_network.m4
+++ b/build/apr_network.m4
@@ -63,6 +63,10 @@ AC_DEFUN([APR_CHECK_WORKING_GETADDRINFO], [
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
+#include <stdlib.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
 
 int main(void) {
     struct addrinfo hints, *ai;
@@ -136,6 +140,11 @@ dnl
 AC_DEFUN([APR_CHECK_WORKING_GETNAMEINFO], [
   AC_CACHE_CHECK(for working getnameinfo, ac_cv_working_getnameinfo,[
   AC_TRY_RUN( [
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <stdlib.h>
+
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
@@ -195,6 +204,8 @@ AC_DEFUN([APR_CHECK_NEGATIVE_EAI], [
 #include <netdb.h>
 #endif
 
+#include <stdlib.h>
+
 int main(void) {
     if (EAI_ADDRFAMILY < 0) {
         exit(0);
@@ -388,9 +399,14 @@ AC_DEFUN([APR_CHECK_TCP_NODELAY_INHERITED], [
   AC_CACHE_CHECK(if TCP_NODELAY setting is inherited from listening sockets, ac_cv_tcp_nodelay_inherited,[
   AC_TRY_RUN( [
 #include <stdio.h>
+#include <stdlib.h>
+
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
-#endif
+#end
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endifif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -734,6 +750,9 @@ AC_TRY_COMPILE([
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
+
+#include <sys/socket.h>
+#include <netinet/in.h>
 ],[
 inet_addr("127.0.0.1");
 ],[
@@ -754,6 +773,9 @@ fi
 AC_DEFUN([APR_CHECK_INET_NETWORK], [
 AC_CACHE_CHECK(for inet_network, ac_cv_func_inet_network,[
 AC_TRY_COMPILE([
+#include <sys/socket.h>
+#include <netinet/in.h>
+
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
--- a/configure.in
+++ b/configure.in
@@ -1440,8 +1440,6 @@ AC_CHECK_FUNCS(sigaction, [ have_sigaction="1" ], [ have_sigaction="0" ])
 AC_DECL_SYS_SIGLIST
 
 AC_CHECK_FUNCS(fork, [ fork="1" ], [ fork="0" ])
-APR_CHECK_INET_ADDR
-APR_CHECK_INET_NETWORK
 AC_SUBST(apr_inaddr_none)
 AC_CHECK_FUNC(_getch)
 AC_CHECK_FUNCS(strerror_r, [ strerror_r="1" ], [ strerror_r="0" ])
@@ -1547,6 +1545,9 @@ APR_FLAG_HEADERS(
     sys/un.h		\
     sys/wait.h)
 
+APR_CHECK_INET_ADDR
+APR_CHECK_INET_NETWORK
+
 # IRIX 6.5 has a problem in <netinet/tcp.h> which prevents it from
 # being included by itself.  Check for <netinet/tcp.h> manually,
 # including another header file first.
@@ -2208,7 +2209,8 @@ AC_TRY_RUN([
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/resource.h>
-main()
+#include <stdlib.h>
+int main()
 {
     struct rlimit limit;
     limit.rlim_cur = 0;
@@ -2247,7 +2249,7 @@ AC_TRY_RUN([
 #ifndef SEM_FAILED
 #define SEM_FAILED (-1)
 #endif
-main()
+int main()
 {
     sem_t *psem;
     const char *sem_name = "/apr_autoconf";
@@ -2307,6 +2309,7 @@ if test "$threads" = "1"; then
       AC_TRY_RUN([
 #include <sys/types.h>
 #include <pthread.h>
+#include <stdlib.h>
         int main()
         {
             pthread_mutex_t mutex;
@@ -2435,6 +2438,8 @@ int fd;
 struct flock proc_mutex_lock_it = {0};
 const char *fname = "conftest.fcntl";
 
+int lockit();
+
 int main()
 {
     int rc, status;;
--- a/poll/os2/pollset.c
+++ b/poll/os2/pollset.c
@@ -308,7 +308,7 @@ APR_DECLARE(apr_status_t) apr_pollset_wakeup(apr_pollset_t *pollset)
 
 
 
-APR_DECLARE(const char *) apr_poll_method_defname()
+APR_DECLARE(const char *) apr_poll_method_defname(void)
 {
     return "select";
 }
--- a/poll/unix/pollset.c
+++ b/poll/unix/pollset.c
@@ -188,7 +188,7 @@ APR_DECLARE(const char *) apr_pollset_method_name(apr_pollset_t *pollset)
     return pollset->provider->name;
 }
 
-APR_DECLARE(const char *) apr_poll_method_defname()
+APR_DECLARE(const char *) apr_poll_method_defname(void)
 {
     const apr_pollset_provider_t *provider = NULL;