diff options
-rw-r--r-- | ConfigureChecks.cmake | 1 | ||||
-rw-r--r-- | config.h.cmake | 3 | ||||
-rw-r--r-- | include/libssh/priv.h | 4 | ||||
-rw-r--r-- | src/log.c | 7 | ||||
-rw-r--r-- | src/misc.c | 8 | ||||
-rw-r--r-- | src/pcap.c | 4 | ||||
-rw-r--r-- | tests/client/torture_connect.c | 2 |
7 files changed, 17 insertions, 12 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 56822f35..f290a6f1 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -59,6 +59,7 @@ check_include_file(unistd.h HAVE_UNISTD_H) check_include_file(util.h HAVE_UTIL_H) check_include_file(libutil.h HAVE_LIBUTIL_H) check_include_file(sys/time.h HAVE_SYS_TIME_H) +check_include_file(sys/utime.h HAVE_SYS_UTIME_H) check_include_file(sys/param.h HAVE_SYS_PARAM_H) check_include_file(arpa/inet.h HAVE_ARPA_INET_H) check_include_file(byteswap.h HAVE_BYTESWAP_H) diff --git a/config.h.cmake b/config.h.cmake index 8d9bfd21..be8e9ee2 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -35,6 +35,9 @@ /* Define to 1 if you have the <sys/time.h> header file. */ #cmakedefine HAVE_SYS_TIME_H 1 +/* Define to 1 if you have the <sys/utime.h> header file. */ +#cmakedefine HAVE_SYS_UTIME_H 1 + /* Define to 1 if you have the <termios.h> header file. */ #cmakedefine HAVE_TERMIOS_H 1 diff --git a/include/libssh/priv.h b/include/libssh/priv.h index da07d93a..2e41225f 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -185,10 +185,6 @@ int gettimeofday(struct timeval *__p, void *__t); # define LIBSSH_MEM_PROTECTION #endif -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif - /* forward declarations */ struct ssh_common_struct; struct ssh_kex_struct; @@ -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> diff --git a/tests/client/torture_connect.c b/tests/client/torture_connect.c index 212fc6b1..45e32b4c 100644 --- a/tests/client/torture_connect.c +++ b/tests/client/torture_connect.c @@ -23,7 +23,9 @@ #include "torture.h" #include <libssh/libssh.h> +#ifdef HAVE_SYS_TIME_H #include <sys/time.h> +#endif /* HAVE_SYS_TIME_H */ #include <arpa/inet.h> #include <netinet/in.h> #include <sys/types.h> |