diff --git a/src/channel.c b/src/channel.c index 353912e0..27010b05 100644 --- a/src/channel.c +++ b/src/channel.c @@ -36,12 +36,13 @@ */ #include "libssh2_priv.h" -#ifndef WIN32 +#ifdef HAVE_UNISTD_H #include -#include #endif - +#include +#ifdef HAVE_INTTYPES_H #include +#endif /* diff --git a/src/misc.c b/src/misc.c index bd69a452..43a98dc8 100644 --- a/src/misc.c +++ b/src/misc.c @@ -36,7 +36,9 @@ */ #include "libssh2_priv.h" +#ifdef HAVE_UNISTD_H #include +#endif /* {{{ libssh2_ntohu32 */ diff --git a/src/packet.c b/src/packet.c index c7fc1247..8cdf856d 100644 --- a/src/packet.c +++ b/src/packet.c @@ -38,18 +38,25 @@ #include "libssh2_priv.h" #include #include -#ifndef WIN32 + +#ifdef HAVE_UNISTD_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif + +#ifdef HAVE_INTTYPES_H +#include +#endif + /* Needed for struct iovec on some platforms */ #ifdef HAVE_SYS_UIO_H #include #endif -#include #include -#include /* {{{ libssh2_packet_queue_listener * Queue a connection request for a listener