From f33375bc035dca64734d321fa691de41d8290f61 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Thu, 12 Apr 2007 22:20:18 +0000 Subject: [PATCH] changed to configure defines to control inclusion of headers from libssh2_config.h. --- src/channel.c | 7 ++++--- src/misc.c | 2 ++ src/packet.c | 13 ++++++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) 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