diff --git a/src/compat.h b/src/compat.h index 50691f49..239e04ef 100644 --- a/src/compat.h +++ b/src/compat.h @@ -20,12 +20,20 @@ * Solaris. */ -#ifdef _WIN32 -#include -#else +#ifdef HAVE_UNISTD_H #include #endif +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif /* Make sure we define 64 bit types */ #ifdef _WIN32 diff --git a/src/connection.c b/src/connection.c index d2c943e7..ff0b3173 100644 --- a/src/connection.c +++ b/src/connection.c @@ -19,7 +19,6 @@ #include #include #include -#include #ifdef HAVE_POLL #include #endif @@ -27,7 +26,6 @@ #include #ifndef _WIN32 -#include #include #include #else diff --git a/src/main.c b/src/main.c index fbdf9cbe..cc78408c 100644 --- a/src/main.c +++ b/src/main.c @@ -56,6 +56,7 @@ #ifdef _WIN32 /* For getpid() */ #include +#include #define snprintf _snprintf #define getpid _getpid #endif diff --git a/src/slave.c b/src/slave.c index 93adf14b..cb792ac3 100644 --- a/src/slave.c +++ b/src/slave.c @@ -25,11 +25,9 @@ #include #include #include -#include #include #ifndef _WIN32 -#include #include #include #else