From 0cf3845302d5919a974b706a0dcb7cd008a88597 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Wed, 11 Apr 2007 07:22:33 +0000 Subject: [PATCH] Replace #if !WIN32 with #if HAVE_SYS_SOCKET_H and HAVE_SYS_IOCTL_H (AIX needs sys/ioctl.h). Reported by Michael Augustin . --- configure.in | 3 ++- src/libssh2_priv.h | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) 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