diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2016-11-06 11:52:12 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2016-11-06 11:52:12 +0100 |
commit | 528b9c5323c61e65877c5fa0dd0f5444edccc981 (patch) | |
tree | 978e1a64765f31bb5bb1a7bb365449dab0b060bb /src | |
parent | fab85b495e1bb023017b8da916d679e52f39c3f4 (diff) | |
download | libssh-528b9c5323c61e65877c5fa0dd0f5444edccc981.tar.gz libssh-528b9c5323c61e65877c5fa0dd0f5444edccc981.tar.xz libssh-528b9c5323c61e65877c5fa0dd0f5444edccc981.zip |
cmake: Correctly check for sys/[u]time.h
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/log.c | 7 | ||||
-rw-r--r-- | src/misc.c | 8 | ||||
-rw-r--r-- | src/pcap.c | 4 |
3 files changed, 11 insertions, 8 deletions
@@ -24,11 +24,12 @@ #include <stdio.h> #include <stdarg.h> #include <string.h> -#ifndef _WIN32 +#ifdef HAVE_SYS_TIME_H #include <sys/time.h> -#else +#endif /* HAVE_SYS_TIME_H */ +#ifdef HAVE_SYS_UTIME_H #include <sys/utime.h> -#endif +#endif /* HAVE_SYS_TIME_H */ #include <time.h> #include "libssh/priv.h" @@ -33,10 +33,6 @@ #include <netinet/in.h> #include <arpa/inet.h> -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif /* HAVE_SYS_TIME_H */ - #endif /* _WIN32 */ #include <limits.h> @@ -47,6 +43,10 @@ #include <sys/types.h> #include <ctype.h> #include <time.h> +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif /* HAVE_SYS_TIME_H */ + #ifdef _WIN32 @@ -29,9 +29,11 @@ #include <ws2tcpip.h> #else #include <netinet/in.h> -#include <sys/time.h> #include <sys/socket.h> #endif +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif /* HAVE_SYS_TIME_H */ #include <errno.h> #include <stdlib.h> |