summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2020-10-29 20:16:55 +0000
committerJim Jagielski <jim@apache.org>2020-10-29 20:16:55 +0000
commit9d9c6990afaa7ad8eea0be524481bb48a5dd1b09 (patch)
tree9204fc3075dc3207c6ada0db49ef103c5787ae5b /build
parent777acc63312de2b4d9eef6183c09957a5c4e9e06 (diff)
downloadapr-9d9c6990afaa7ad8eea0be524481bb48a5dd1b09.tar.gz
calls to exit() require stdlib.h or else we get -Werror,-Wimplicit-function-declaration
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1882979 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rw-r--r--build/apr_common.m43
-rw-r--r--build/apr_network.m415
2 files changed, 18 insertions, 0 deletions
diff --git a/build/apr_common.m4 b/build/apr_common.m4
index 9686e5d85..3dfe85542 100644
--- a/build/apr_common.m4
+++ b/build/apr_common.m4
@@ -495,6 +495,9 @@ AC_CACHE_CHECK([whether return code from strerror_r has type int],
#include <errno.h>
#include <string.h>
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
main()
{
char buf[1024];
diff --git a/build/apr_network.m4 b/build/apr_network.m4
index 248898283..d330ba16f 100644
--- a/build/apr_network.m4
+++ b/build/apr_network.m4
@@ -63,6 +63,9 @@ AC_DEFUN([APR_CHECK_WORKING_GETADDRINFO], [
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
int main(void) {
struct addrinfo hints, *ai;
@@ -151,6 +154,9 @@ AC_DEFUN([APR_CHECK_WORKING_GETNAMEINFO], [
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
int main(void) {
struct sockaddr_in sa;
@@ -194,6 +200,9 @@ AC_DEFUN([APR_CHECK_NEGATIVE_EAI], [
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
int main(void) {
if (EAI_ADDRFAMILY < 0) {
@@ -403,6 +412,9 @@ AC_DEFUN([APR_CHECK_TCP_NODELAY_INHERITED], [
#ifndef HAVE_SOCKLEN_T
typedef int socklen_t;
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
int main(void) {
int listen_s, connected_s, client_s;
int listen_port, rc;
@@ -588,6 +600,9 @@ typedef int socklen_t;
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
int main(void) {
int listen_s, connected_s, client_s;
int listen_port, rc;