configure: Don't check for inotify on illumos
authorJorge Schrauwen <sjorge@blackdot.be>
Sun, 3 Apr 2016 09:43:50 +0000 (11:43 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 28 Apr 2016 10:33:24 +0000 (12:33 +0200)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11816
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 94f31295b12b20a68d596929ea428eb36f8c0d82)

source3/wscript
source4/ntvfs/sysdep/wscript_configure

index a5c83583d16d398c271a2b60aa1df5c55b7aa452..f7fded880d160e551db72032333003b16ffe45db 100644 (file)
@@ -116,10 +116,13 @@ long ret = splice(0,0,1,0,400,SPLICE_F_MOVE);
         headers='fcntl.h'):
         conf.CHECK_DECLS('splice', reverse=True, headers='fcntl.h')
 
-    # Check for inotify support
-    conf.CHECK_HEADERS('sys/inotify.h')
-    if "HAVE_SYS_INOTIFY_H" in conf.env:
-        conf.DEFINE('HAVE_INOTIFY', 1)
+    # Check for inotify support (Skip if we are SunOS)
+    #NOTE: illumos provides sys/inotify.h but is not an exact match for linux
+    host_os = sys.platform
+    if host_os.rfind('sunos') == -1:
+        conf.CHECK_HEADERS('sys/inotify.h')
+        if "HAVE_SYS_INOTIFY_H" in conf.env:
+           conf.DEFINE('HAVE_INOTIFY', 1)
 
     # Check for kernel change notify support
     conf.CHECK_CODE('''
index aa63000499ecbde3a1e3384fcc3517657bb3d7fc..274fc08b58154003f8414f9d5b5e9b3c180a9ec0 100644 (file)
@@ -1,9 +1,14 @@
 #!/usr/bin/env python
 
-conf.CHECK_HEADERS('sys/inotify.h', add_headers=False)
+import sys
+
+# Check for inotify support (Skip if we are SunOS)
+#NOTE: illumos provides sys/inotify.h but is not an exact match for linux
+host_os = sys.platform
+if host_os.rfind('sunos') == -1:
+    conf.CHECK_HEADERS('sys/inotify.h', add_headers=False)
+    if (conf.CONFIG_SET('HAVE_SYS_INOTIFY_H')):
+        conf.DEFINE('HAVE_LINUX_INOTIFY', 1)
 
 conf.CHECK_DECLS('F_SETLEASE', headers='linux/fcntl.h', reverse=True)
 conf.CHECK_DECLS('SA_SIGINFO', headers='signal.h', reverse=True)
-
-if (conf.CONFIG_SET('HAVE_SYS_INOTIFY_H')):
-    conf.DEFINE('HAVE_LINUX_INOTIFY', 1)