summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/apr_common.m42
-rw-r--r--build/apr_network.m420
-rw-r--r--build/aprconf.py4
-rw-r--r--build/dbm.m42
-rw-r--r--build/jlibtool.c14
5 files changed, 31 insertions, 11 deletions
diff --git a/build/apr_common.m4 b/build/apr_common.m4
index 3be864702..03d7dca7f 100644
--- a/build/apr_common.m4
+++ b/build/apr_common.m4
@@ -501,7 +501,7 @@ AC_CACHE_CHECK([whether return code from strerror_r has type int],
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
-main()
+int main(void)
{
char buf[1024];
if (strerror_r(ERANGE, buf, sizeof buf) < 1) {
diff --git a/build/apr_network.m4 b/build/apr_network.m4
index 2e446957e..ea5f37007 100644
--- a/build/apr_network.m4
+++ b/build/apr_network.m4
@@ -66,6 +66,12 @@ AC_DEFUN([APR_CHECK_WORKING_GETADDRINFO], [
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
int main(void) {
struct addrinfo hints, *ai;
@@ -400,9 +406,11 @@ 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
+#include <string.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -752,6 +760,12 @@ AC_TRY_COMPILE([
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
],[
inet_addr("127.0.0.1");
],[
@@ -772,6 +786,10 @@ 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>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -958,7 +976,9 @@ AC_DEFUN([APR_CHECK_MCAST], [
AC_CACHE_CHECK([for struct ip_mreq], [apr_cv_struct_ipmreq], [
AC_TRY_COMPILE([
#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
], [
struct ip_mreq mip;
mip.imr_interface.s_addr = INADDR_ANY;
diff --git a/build/aprconf.py b/build/aprconf.py
index 74df43f13..e81bed3b2 100644
--- a/build/aprconf.py
+++ b/build/aprconf.py
@@ -275,7 +275,7 @@ void main(void)
#ifndef SEM_FAILED
#define SEM_FAILED (-1)
#endif
-main()
+int main()
{
sem_t *psem;
const char *sem_name = "/apr_autoconf";
@@ -394,7 +394,7 @@ int main(void) {
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
-main()
+int main()
{
union semun arg;
semctl(0, 0, 0, arg);
diff --git a/build/dbm.m4 b/build/dbm.m4
index bbe9c863a..5c4ab26a6 100644
--- a/build/dbm.m4
+++ b/build/dbm.m4
@@ -235,7 +235,7 @@ AC_DEFUN([APU_TRY_BERKELEY_DB],
#include <stdlib.h>
#include <stdio.h>
#include <$apu_try_berkeley_db_header>
-main ()
+int main (void)
{
int major, minor, patch;
diff --git a/build/jlibtool.c b/build/jlibtool.c
index 892e26d56..bae4c1d69 100644
--- a/build/jlibtool.c
+++ b/build/jlibtool.c
@@ -223,7 +223,7 @@ enum lib_type {
typedef struct {
const char **vals;
- int num;
+ int num;
} count_chars;
typedef struct {
@@ -312,7 +312,7 @@ static int snprintf( char *str, size_t n, const char *fmt, ... )
{
va_list ap;
int res;
-
+
va_start( ap, fmt );
res = vsnprintf( str, n, fmt, ap );
va_end( ap );
@@ -680,7 +680,7 @@ long safe_strtol(const char *nptr, const char **endptr, int base)
return 0;
}
- return rv;
+ return rv;
}
void safe_mkdir(const char *path)
@@ -867,7 +867,7 @@ char *check_object_exists(command_t *cmd, const char *arg, int arglen)
*/
default:
break;
- }
+ }
if (!cmd->options.silent) {
printf("Checking (obj): %s\n", newarg);
@@ -939,7 +939,7 @@ char *check_library_exists(command_t *cmd, const char *arg, int pathlen,
default:
*libtype = type_UNKNOWN;
break;
- }
+ }
if (!cmd->options.silent) {
printf("Checking (lib): %s\n", newarg);
@@ -1932,7 +1932,7 @@ int run_mode(command_t *cmd_data)
break;
default:
break;
- }
+ }
return 0;
}
@@ -2048,7 +2048,7 @@ int main(int argc, char *argv[])
rc = run_mode(&cmd_data);
if (!rc) {
- add_for_runtime(&cmd_data);
+ add_for_runtime(&cmd_data);
}
cleanup_tmp_dirs(&cmd_data);