$NetBSD$ --- source3/wscript.orig 2016-05-02 07:29:51.000000000 +0000 +++ source3/wscript @@ -135,13 +135,17 @@ long ret = splice(0,0,1,0,400,SPLICE_F_M headers='fcntl.h'): conf.CHECK_DECLS('splice', reverse=True, headers='fcntl.h') - # Check for inotify support (Skip if we are SunOS) - #NOTE: illumos provides sys/inotify.h but is not an exact match for linux + # Check for inotify support host_os = sys.platform - if host_os.rfind('sunos') == -1: - conf.CHECK_HEADERS('sys/inotify.h') + conf.CHECK_HEADERS('sys/inotify.h') + conf.CHECK_HEADERS('sys/filio.h') + if host_os.rfind('sunos') > -1: + #NOTE: illumos provides sys/inotify.h but also needs sys/filio.h + if "HAVE_SYS_INOTIFY_H" in conf.env and "HAVE_SYS_FILIO_H" in conf.env: + conf.DEFINE('HAVE_INOTIFY', 1) + else: if "HAVE_SYS_INOTIFY_H" in conf.env: - conf.DEFINE('HAVE_INOTIFY', 1) + conf.DEFINE('HAVE_INOTIFY', 1) # Check for kernel change notify support conf.CHECK_CODE('''