diff --git a/configure.ac b/configure.ac index a124ec5..eeda1ef 100644 --- a/configure.ac +++ b/configure.ac @@ -53,7 +53,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 pty.h util.h termios.h]) +AC_CHECK_HEADERS([sys/select.h sys/time.h pty.h util.h termios.h]) AC_CHECK_LIB([network],[socket]) AC_CHECK_LIB([util],[forkpty]) 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/examples/client/client.c b/examples/client/client.c index 59df92c..bf270cf 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -51,7 +51,9 @@ #include #endif /* WOLFSSH_AGENT */ -#include +#ifdef HAVE_SYS_SELECT_H + #include +#endif #ifndef NO_WOLFSSH_CLIENT diff --git a/examples/echoserver/echoserver.c b/examples/echoserver/echoserver.c index d71e92e..574b237 100644 --- a/examples/echoserver/echoserver.c +++ b/examples/echoserver/echoserver.c @@ -77,7 +77,9 @@ #include #endif /* WOLFSSH_AGENT */ -#include +#ifdef HAVE_SYS_SELECT_H + #include +#endif #ifndef NO_WOLFSSH_SERVER diff --git a/examples/portfwd/portfwd.c b/examples/portfwd/portfwd.c index d12ea5c..1c06b13 100644 --- a/examples/portfwd/portfwd.c +++ b/examples/portfwd/portfwd.c @@ -23,9 +23,13 @@ #include -#include +#ifdef HAVE_TERMIOS_H + #include +#endif #include -#include +#ifdef HAVE_SYS_SELECT_H + #include +#endif #include #include #include