Solaris build fix for GIO
authorMatthias Clasen <mclasen@redhat.com>
Mon, 6 Aug 2012 15:55:59 +0000 (11:55 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 6 Aug 2012 15:55:59 +0000 (11:55 -0400)
Solaris/OpenSolaris/OpenIndiana define FIONREAD in sys/filio.h.
This commit adds a configure check for this header, and includes
it conditionally in gio/gsocket.c.

Patch by Fabian Groffen, bug 675524.

configure.ac
gio/gsocket.c

index efe3e75..867fba3 100644 (file)
@@ -883,7 +883,7 @@ fi
 AC_CHECK_HEADERS([dirent.h float.h limits.h pwd.h grp.h sys/param.h sys/poll.h sys/resource.h])
 AC_CHECK_HEADERS([sys/time.h sys/times.h sys/wait.h unistd.h values.h])
 AC_CHECK_HEADERS([sys/select.h sys/types.h stdint.h inttypes.h sched.h malloc.h])
-AC_CHECK_HEADERS([sys/vfs.h sys/vmount.h sys/statfs.h sys/statvfs.h])
+AC_CHECK_HEADERS([sys/vfs.h sys/vmount.h sys/statfs.h sys/statvfs.h sys/filio.h])
 AC_CHECK_HEADERS([mntent.h sys/mnttab.h sys/vfstab.h sys/mntctl.h fstab.h])
 AC_CHECK_HEADERS([sys/uio.h sys/mkdev.h])
 AC_CHECK_HEADERS([linux/magic.h])
index 9062cc9..5243b9a 100644 (file)
 # include <sys/ioctl.h>
 #endif
 
+#ifdef HAVE_SYS_FILIO_H
+# include <sys/filio.h>
+#endif
+
 #ifdef HAVE_SYS_UIO_H
 #include <sys/uio.h>
 #endif