diff --git a/README b/README index aa3f94b..2769ee2 100644 --- a/README +++ b/README @@ -141,5 +141,7 @@ Libiscsi has been tested on: * Linux (32 and 64 bit) * Cygwin * FreeBSD -* Windows (Win7-VisualStudio) +* Windows (Win7-VisualStudio10) +* OpenSolaris + diff --git a/configure.ac b/configure.ac index 8e5c438..31cf510 100644 --- a/configure.ac +++ b/configure.ac @@ -79,6 +79,15 @@ if test x"$libiscsi_cv_HAVE_TCP_KEEPALIVE" = x"yes"; then AC_DEFINE(HAVE_TCP_KEEPALIVE,1,[Whether we have support for tcp keepalive socket options]) fi +AC_CACHE_CHECK([for sys filio.h],libiscsi_cv_NEED_SYS_FILIO_H,[ +AC_TRY_COMPILE([#include +#include ], +[int foo = FIONREAD], +libiscsi_cv_NEED_SYS_FILIO_H=yes,libiscsi_cv_NEED_SYS_FILIO_H=no)]) +if test x"$libiscsi_cv_NEED_SYS_FILIO_H" = x"yes"; then + AC_DEFINE(NEED_SYS_FILIO_H,1,[Whether we need sys/filio.h]) +fi + AC_MSG_CHECKING(whether libpopt is available) ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" diff --git a/lib/socket.c b/lib/socket.c index eafee0a..ee46991 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -33,6 +33,10 @@ #include #endif +#ifdef NEED_SYS_FILIO_H +#include +#endif + #include #include #include