Skip to content

Commit 722c3bc

Browse files
committed
Release Rollup
1. Wrap the include of sys/time.h in wolfscp.h with a check of configure's HAVE_SYS_TIME_H. 2. Add a header check to the configure script.
1 parent 0ea40ec commit 722c3bc

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ AC_CHECK_SIZEOF([off_t])
5656

5757
# Check headers/libs
5858
AC_CHECK_FUNCS([gethostbyname getaddrinfo gettimeofday inet_ntoa memset socket])
59+
AC_CHECK_HEADERS([sys/time.h])
5960
AC_CHECK_LIB([network],[socket])
6061
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/ .])])
6162

wolfssh/wolfscp.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ extern "C" {
5353
#endif
5454

5555
#if !defined(WOLFSSH_SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
56-
/* for utimes() */
57-
#include <sys/time.h>
56+
#include <time.h>
57+
#ifdef HAVE_SYS_TIME_H
58+
#include <sys/time.h>
59+
#endif
5860
#include <errno.h>
5961

6062
typedef struct ScpSendCtx {

0 commit comments

Comments
 (0)