From 658ffb19826b3cfde323c3e16fde4f713e88ffd8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 18 Nov 2014 11:28:20 +0000 Subject: [PATCH] smbd: Compile notify_inotify only if available Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/notify_inotify.c | 4 ---- source3/wscript_build | 8 ++++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c index fedf9b522ff..944f27a1553 100644 --- a/source3/smbd/notify_inotify.c +++ b/source3/smbd/notify_inotify.c @@ -26,8 +26,6 @@ #include "smbd/smbd.h" #include "lib/sys_rw_data.h" -#ifdef HAVE_INOTIFY - #include /* glibc < 2.5 headers don't have these defines */ @@ -426,5 +424,3 @@ int inotify_watch(TALLOC_CTX *mem_ctx, return 0; } - -#endif diff --git a/source3/wscript_build b/source3/wscript_build index 51d72e78b64..5128b96bfd5 100755 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -506,6 +506,11 @@ bld.SAMBA3_SUBSYSTEM('sysquotas', allow_warnings=True, deps='samba3-util samba-util') +NOTIFY_SOURCES='' + +if bld.CONFIG_SET("HAVE_INOTIFY"): + NOTIFY_SOURCES += ' smbd/notify_inotify.c' + bld.SAMBA3_LIBRARY('smbd_base', source=''' smbd/server_reload.c @@ -595,9 +600,8 @@ bld.SAMBA3_LIBRARY('smbd_base', smbd/oplock_irix.c smbd/oplock_linux.c smbd/notify.c - smbd/notify_inotify.c smbd/notify_internal.c - smbd/build_options.c''', + smbd/build_options.c''' + NOTIFY_SOURCES, deps=''' talloc tevent -- 2.34.1