diff --git a/configure.in b/configure.in index ac333b2..3a9d71b 100644 --- a/configure.in +++ b/configure.in @@ -225,7 +225,8 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]), # Checks for header files. # AC_HEADER_STDC -AC_CHECK_HEADERS([errno.h fcntl.h stdio.h stdlib.h unistd.h sys/uio.h sys/select.h]) +AC_CHECK_HEADERS([errno.h fcntl.h stdio.h stdlib.h unistd.h]) +AC_CHECK_HEADERS([sys/uio.h sys/select.h sys/socket.h sys/ioctl.h]) AC_CHECK_FUNCS(poll gettimeofday select) # Checks for typedefs, structures, and compiler characteristics. diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h index cb20f5b..d8c0a1b 100644 --- a/src/libssh2_priv.h +++ b/src/libssh2_priv.h @@ -68,9 +68,11 @@ #include -#ifndef WIN32 -#include -#include +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +#ifdef HAVE_SYS_IOCTL_H +# include #endif #ifdef LIBSSH2_LIBGCRYPT