Replace #if !WIN32 with #if HAVE_SYS_SOCKET_H and HAVE_SYS_IOCTL_H

(AIX needs sys/ioctl.h).  Reported by Michael Augustin
<maugustin-hi6Y0CQ0nG0@public.gmane.org>.
This commit is contained in:
Simon Josefsson 2007-04-11 07:22:33 +00:00
parent 149af707de
commit 0cf3845302
2 changed files with 7 additions and 4 deletions

View File

@ -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.

View File

@ -68,9 +68,11 @@
#include <stdio.h>
#ifndef WIN32
#include <sys/socket.h>
#include <sys/ioctl.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
#ifdef LIBSSH2_LIBGCRYPT