diff options
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | daemon.c | 4 | ||||
-rw-r--r-- | driver.c | 5 | ||||
-rw-r--r-- | fetchmail.c | 2 | ||||
-rw-r--r-- | rcfile_y.y | 2 |
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. @@ -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 } @@ -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> @@ -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) |