aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.in2
-rw-r--r--daemon.c4
-rw-r--r--driver.c5
-rw-r--r--fetchmail.c2
-rw-r--r--rcfile_y.y2
5 files changed, 14 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 3a51afa1..44d453ce 100644
--- a/configure.in
+++ b/configure.in
@@ -23,7 +23,7 @@ AC_HEADER_STDC
AC_TYPE_SIZE_T
AC_TYPE_PID_T
AC_TYPE_SIGNAL
-AC_CHECK_HEADERS(unistd.h termios.h termio.h sgtty.h stdarg.h alloca.h sys/itimer.h fcntl.h sys/fcntl.h memory.h)
+AC_CHECK_HEADERS(unistd.h termios.h termio.h sgtty.h stdarg.h alloca.h sys/itimer.h fcntl.h sys/fcntl.h memory.h sys/wait.h)
AC_C_CONST dnl getopt needs this.
diff --git a/daemon.c b/daemon.c
index f71d0343..5c66ed5a 100644
--- a/daemon.c
+++ b/daemon.c
@@ -10,7 +10,9 @@
#include <errno.h>
#include <signal.h>
#include <sys/types.h>
+#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
+#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#else /* !HAVE_FCNTL_H */
@@ -71,6 +73,8 @@ sigchld_handler (int sig)
while ((pid = wait3(&status, WNOHANG, 0)) > 0)
continue; /* swallow 'em up. */
#else /* Zooks! Nothing to do but wait(), and hope we don't block... */
+ int status;
+
wait(&status);
#endif
}
diff --git a/driver.c b/driver.c
index 2548b668..3bf6df4d 100644
--- a/driver.c
+++ b/driver.c
@@ -38,6 +38,11 @@
#include <sys/time.h>
#include <signal.h>
+#ifndef HAVE_STRFTIME /* For ctime prototype */
+#include <sys/types.h>
+#include <time.h>
+#endif
+
#ifdef HAVE_GETHOSTBYNAME
#include <netdb.h>
#include "mx.h"
diff --git a/fetchmail.c b/fetchmail.c
index e6c45c02..995da218 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -31,7 +31,9 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
+#endif
#ifdef HAVE_GETHOSTBYNAME
#include <netdb.h>
diff --git a/rcfile_y.y b/rcfile_y.y
index 9b0573d1..71d8ea4b 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -9,7 +9,9 @@
#include <stdio.h>
#include <sys/types.h>
#include <sys/file.h>
+#if defined(HAVE_SYS_WAIT_H)
#include <sys/wait.h>
+#endif
#include <sys/stat.h>
#include <errno.h>
#if defined(STDC_HEADERS)