]> git.ozlabs.org Git - ccan/commitdiff
iscsi: use <sys/filio.h> on Solaris.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 27 Mar 2012 03:54:00 +0000 (14:24 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 27 Mar 2012 03:54:00 +0000 (14:24 +1030)
Needed for FIONREAD.

ccan/iscsi/socket.c
config.h
tools/configurator/configurator.c

index 17c6ffee3b0370af99997fd127459b0fc8a51796..f79b31692b764dffb3e5136e1a1fb504a15c3c30 100644 (file)
@@ -15,6 +15,7 @@
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -31,6 +32,9 @@
 #include "iscsi.h"
 #include "iscsi-private.h"
 #include "dlinklist.h"
 #include "iscsi.h"
 #include "iscsi-private.h"
 #include "dlinklist.h"
+#if HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
 
 static void set_nonblocking(int fd)
 {
 
 static void set_nonblocking(int fd)
 {
index 09b45824603dff28faef4364110ae0c5f3c8f1e0..34aed3c9f163f815fc45c33c8e5a4ce82c154531 100644 (file)
--- a/config.h
+++ b/config.h
@@ -46,6 +46,7 @@
 #define HAVE_SECTION_START_STOP 1
 #define HAVE_STACK_GROWS_UPWARDS 0
 #define HAVE_STATEMENT_EXPR 1
 #define HAVE_SECTION_START_STOP 1
 #define HAVE_STACK_GROWS_UPWARDS 0
 #define HAVE_STATEMENT_EXPR 1
+#define HAVE_SYS_FILIO_H 0
 #define HAVE_TYPEOF 1
 #define HAVE_UTIME 1
 #define HAVE_WARN_UNUSED_RESULT 1
 #define HAVE_TYPEOF 1
 #define HAVE_UTIME 1
 #define HAVE_WARN_UNUSED_RESULT 1
index 812b1b0316ff22632f71d9fde074e19183cfdf8b..63fa46fa9a3e3240d6b271099aff1cdd429ce535 100644 (file)
@@ -200,6 +200,8 @@ static struct test tests[] = {
          "}\n" },
        { "HAVE_STATEMENT_EXPR", INSIDE_MAIN, NULL,
          "return ({ int x = argc; x == argc ? 0 : 1; });" },
          "}\n" },
        { "HAVE_STATEMENT_EXPR", INSIDE_MAIN, NULL,
          "return ({ int x = argc; x == argc ? 0 : 1; });" },
+       { "HAVE_SYS_FILIO_H", OUTSIDE_MAIN, NULL, /* Solaris needs this for FIONREAD */
+         "#include <sys/filio.h>\n" },
        { "HAVE_TYPEOF", INSIDE_MAIN, NULL,
          "__typeof__(argc) i; i = argc; return i == argc ? 0 : 1;" },
        { "HAVE_UTIME", DEFINES_FUNC, NULL,
        { "HAVE_TYPEOF", INSIDE_MAIN, NULL,
          "__typeof__(argc) i; i = argc; return i == argc ? 0 : 1;" },
        { "HAVE_UTIME", DEFINES_FUNC, NULL,