From 0a2a1d6d7735545ca9fec32ee3646c903d03c7e7 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 4 Apr 2016 13:43:02 +0200 Subject: [PATCH 1/2] nwrap: Fix the build on Solaris BUG: https://bugzilla.samba.org/show_bug.cgi?id=11816 Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Tue Apr 5 08:57:06 CEST 2016 on sn-devel-144 (cherry picked from commit ff6b49beeb5df30f4e243a97d2e6218ec497e9ad) --- lib/nss_wrapper/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nss_wrapper/wscript b/lib/nss_wrapper/wscript index b25b83d..e12e1a7 100644 --- a/lib/nss_wrapper/wscript +++ b/lib/nss_wrapper/wscript @@ -62,7 +62,7 @@ def configure(conf): define='HAVE_SOLARIS_GETPWUID_R', headers='unistd.h pwd.h') conf.CHECK_C_PROTOTYPE('getgrent_r', 'struct group *getgrent_r(struct group *src, char *buf, int buflen)', - define='SOLARIS_GETGRENT_R', headers='unistd.h grp.h') + define='HAVE_SOLARIS_GETGRENT_R', headers='unistd.h grp.h') conf.CHECK_C_PROTOTYPE('getgrnam_r', 'int getgrnam_r(const char *name, struct group *grp, char *buf, int buflen, struct group **pgrp)', define='HAVE_SOLARIS_GETGRNAM_R', headers='unistd.h grp.h') -- 1.9.1 From 5468d107a57875690639693dc5ae8c421299585a Mon Sep 17 00:00:00 2001 From: Jorge Schrauwen Date: Sun, 3 Apr 2016 11:43:50 +0200 Subject: [PATCH 2/2] configure: Don't check for inotify on illumos Bug: https://bugzilla.samba.org/show_bug.cgi?id=11816 Reviewed-by: Volker Lendecke Reviewed-by: Jeremy Allison (cherry picked from commit 94f31295b12b20a68d596929ea428eb36f8c0d82) --- source3/wscript | 11 +++++++---- source4/ntvfs/sysdep/wscript_configure | 13 +++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/source3/wscript b/source3/wscript index 1a31fb2..e201710 100644 --- a/source3/wscript +++ b/source3/wscript @@ -117,10 +117,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(''' diff --git a/source4/ntvfs/sysdep/wscript_configure b/source4/ntvfs/sysdep/wscript_configure index aa63000..274fc08 100644 --- a/source4/ntvfs/sysdep/wscript_configure +++ b/source4/ntvfs/sysdep/wscript_configure @@ -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) -- 1.9.1