diff --git a/configure.ac b/configure.ac index 520ff16..a73bb84 100644 --- a/configure.ac +++ b/configure.ac @@ -56,6 +56,7 @@ AC_CHECK_SIZEOF([off_t]) # Check headers/libs AC_CHECK_FUNCS([gethostbyname getaddrinfo gettimeofday inet_ntoa memset socket]) +AC_CHECK_HEADERS([sys/time.h]) AC_CHECK_LIB([network],[socket]) AC_CHECK_LIB([wolfssl],[wolfCrypt_Init],,[AC_MSG_ERROR([libwolfssl is required for ${PACKAGE}. It can be obtained from https://www.wolfssl.com/download.html/ .])]) diff --git a/wolfssh/wolfscp.h b/wolfssh/wolfscp.h index b67e613..6592f20 100644 --- a/wolfssh/wolfscp.h +++ b/wolfssh/wolfscp.h @@ -53,8 +53,10 @@ extern "C" { #endif #if !defined(WOLFSSH_SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM) - /* for utimes() */ - #include + #include + #ifdef HAVE_SYS_TIME_H + #include + #endif #include typedef struct ScpSendCtx {