[PATCH] Fix notify subsystem build with FAM support

Ralph Boehme slow at samba.org
Sat Feb 13 06:13:47 UTC 2016


Hi!

Building the notify system with FAM support is broken. Patch attached.

Please review&push if ok. Thanks!

Cheerio!
-slow
-------------- next part --------------
From 4a5d4a5bc8eeb88d9de8c73b44dc20775e1d6e4a Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Fri, 12 Feb 2016 17:20:59 +0100
Subject: [PATCH 1/2] smbd: fix build with FAM support

Rename _fam_watch() to fam_watch(). I don't see a reason why this should
be prefixed with an underscore. It's also inline with the corresponding
inotify function inotify_watch().

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11733

Signed-off-by: Ralph Boehme <slow at samba.org>
---
 source3/smbd/notify_fam.c | 2 +-
 source3/smbd/proto.h      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/source3/smbd/notify_fam.c b/source3/smbd/notify_fam.c
index bf9050d..d8d6946 100644
--- a/source3/smbd/notify_fam.c
+++ b/source3/smbd/notify_fam.c
@@ -221,7 +221,7 @@ static int fam_watch_context_destructor(struct fam_watch_context *ctx)
   add a watch. The watch is removed when the caller calls
   talloc_free() on *handle
 */
-int _fam_watch(TALLOC_CTX *mem_ctx,
+int fam_watch(TALLOC_CTX *mem_ctx,
 	      struct sys_notify_context *ctx,
 	      const char *path,
 	      uint32_t *filter,
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 2eac3ec..0afed95 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -543,7 +543,7 @@ int inotify_watch(TALLOC_CTX *mem_ctx,
 		  void *private_data,
 		  void *handle_p);
 
-int _fam_watch(TALLOC_CTX *mem_ctx,
+int fam_watch(TALLOC_CTX *mem_ctx,
 	      struct sys_notify_context *ctx,
 	      const char *path,
 	      uint32_t *filter,
-- 
2.5.0


From 4d1d3b82f18cb8fb0ee095fa2a4636af841bcbf4 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Fri, 12 Feb 2016 17:25:09 +0100
Subject: [PATCH 2/2] smbd: fix build with FAM support

Add missing define of HAVE_FAM when FAM is detected.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11733

Signed-off-by: Ralph Boehme <slow at samba.org>
---
 source3/wscript | 1 +
 1 file changed, 1 insertion(+)

diff --git a/source3/wscript b/source3/wscript
index 4e940fa..3d0e1e1 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -186,6 +186,7 @@ main() {
 
     if samba_fam_libs is not None:
         conf.DEFINE('SAMBA_FAM_LIBS', samba_fam_libs)
+        conf.DEFINE('HAVE_FAM', 1)
     else:
         if Options.options.with_fam == True:
             conf.fatal('FAM support requested, but no suitable FAM library found')
-- 
2.5.0



More information about the samba-technical mailing list