From: Trent Nelson Date: Tue, 28 Jun 2011 06:19:21 +0000 (-0400) Subject: Fix compile error on solaris. X-Git-Tag: upstream/1.9.6^2~359^2~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=fc01d2a96189edc0c08fb1d757f83c63077b0516;p=deb_libnfs.git Fix compile error on solaris. Include sys/filio.h explicitly as solaris doesn't define BSD_COMP and thus doesn't pull this header via sys/ioctl.h. Needed for FIONREAD. --- diff --git a/configure.ac b/configure.ac index 97e191f..9689a1f 100644 --- a/configure.ac +++ b/configure.ac @@ -4,16 +4,6 @@ AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign]) AC_CANONICAL_HOST -case $host in - *darwin*) - RPCGENFLAGS=-DU_INT64_PLATTFORM_TYPE="u_int64_t" - ;; - *) - ;; -esac - -AC_SUBST(RPCGENFLAGS) - # Work around stupid autoconf default cflags. pt 1 SAVE_CFLAGS="x${CFLAGS}" @@ -56,6 +46,19 @@ if test x$ENABLE_EXAMPLES = xyes; then fi AC_SUBST(MAYBE_EXAMPLES) +case $host in + *darwin*) + RPCGENFLAGS=-DU_INT64_PLATTFORM_TYPE="u_int64_t" + ;; + *solaris*) + AC_CHECK_HEADERS([sys/filio.h]) + ;; + *) + ;; +esac + +AC_SUBST(RPCGENFLAGS) + #output AC_CONFIG_FILES([Makefile] [include/Makefile] diff --git a/lib/socket.c b/lib/socket.c index 7a29134..96bc695 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -15,6 +15,9 @@ along with this program; if not, see . */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include @@ -25,6 +28,9 @@ #include #include #include +#ifdef HAVE_SYS_FILIO_H +#include +#endif #include #include "libnfs.h" #include "libnfs-raw.h"