diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2015-06-24 16:51:28 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-06-24 18:36:08 +0200 |
commit | 64233fa3bbedd338c216136babafdbfc68b094bb (patch) | |
tree | a26d46e4591365ac42ace3266fee635314f0764a | |
parent | cbf5cf4ac3fa30bbfd00c9943649b0f524298d9f (diff) | |
download | libssh-64233fa3bbedd338c216136babafdbfc68b094bb.tar.gz libssh-64233fa3bbedd338c216136babafdbfc68b094bb.tar.xz libssh-64233fa3bbedd338c216136babafdbfc68b094bb.zip |
misc: Correctly guard the sys/time.h include
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit ef751a26d0cb746966aaee64cfb5d1a87efba535)
-rw-r--r-- | src/misc.c | 5 | ||||
-rw-r--r-- | src/poll.c | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -33,9 +33,10 @@ #include <netinet/in.h> #include <arpa/inet.h> -#ifndef HAVE_CLOCK_GETTIME +#ifdef HAVE_SYS_TIME_H #include <sys/time.h> -#endif /* HAVE_CLOCK_GETTIME */ +#endif /* HAVE_SYS_TIME_H */ + #endif /* _WIN32 */ #include <limits.h> @@ -116,7 +116,11 @@ static poll_fn ssh_poll_emu; #else /* _WIN32 */ #include <sys/select.h> #include <sys/socket.h> -#include <sys/time.h> + +# ifdef HAVE_SYS_TIME_H +# include <sys/time.h> +# endif + #endif /* _WIN32 */ #ifdef HAVE_UNISTD_H |