aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-06-24 16:51:28 +0200
committerAndreas Schneider <asn@cryptomilk.org>2015-06-24 17:13:19 +0200
commitef751a26d0cb746966aaee64cfb5d1a87efba535 (patch)
tree1e91f49bd03708cc8d077cbe1776065b9a751364
parent30a7229fc5f147c9f39abfa9272546773f58678c (diff)
downloadlibssh-ef751a26d0cb746966aaee64cfb5d1a87efba535.tar.gz
libssh-ef751a26d0cb746966aaee64cfb5d1a87efba535.tar.xz
libssh-ef751a26d0cb746966aaee64cfb5d1a87efba535.zip
misc: Correctly guard the sys/time.h include
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/misc.c5
-rw-r--r--src/poll.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/misc.c b/src/misc.c
index 6daf60ab..64cda47b 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -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>
diff --git a/src/poll.c b/src/poll.c
index 05faba75..807b0a56 100644
--- a/src/poll.c
+++ b/src/poll.c
@@ -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