[SCM] Samba Shared Repository - branch master updated - b1b58a1dcff56665714d7b20c58ab166e26fd512

Andrew Tridgell tridge at samba.org
Thu Oct 30 04:54:39 GMT 2008


The branch, master has been updated
       via  b1b58a1dcff56665714d7b20c58ab166e26fd512 (commit)
      from  031c5d2753281ac4e8ae2a46f4e1b4bf19d2fa70 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b1b58a1dcff56665714d7b20c58ab166e26fd512
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Oct 30 15:53:46 2008 +1100

    use glibc sys/inotify.h header
    
    when we first added the inotify code glibc didn't have the inotify
    functions yet. Now that it does we can use the official header and
    avoid the asm/unistd.h syscall workaround

-----------------------------------------------------------------------

Summary of changes:
 source4/ntvfs/sysdep/config.m4 |    6 +++++-
 source4/ntvfs/sysdep/inotify.c |    5 +++++
 2 files changed, 10 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/sysdep/config.m4 b/source4/ntvfs/sysdep/config.m4
index 6de75a4..f54f65d 100644
--- a/source4/ntvfs/sysdep/config.m4
+++ b/source4/ntvfs/sysdep/config.m4
@@ -1,9 +1,13 @@
-AC_CHECK_HEADERS(linux/inotify.h asm/unistd.h)
+AC_CHECK_HEADERS(linux/inotify.h asm/unistd.h sys/inotify.h)
 AC_CHECK_FUNC(inotify_init)
 AC_HAVE_DECL(__NR_inotify_init, [#include <asm/unistd.h>])
 
 SMB_ENABLE(sys_notify_inotify, NO)
 
+if test x"$ac_cv_func_inotify_init" = x"yes" -a x"$ac_cv_header_sys_inotify_h" = x"yes"; then
+    SMB_ENABLE(sys_notify_inotify, YES)
+fi
+
 if test x"$ac_cv_func_inotify_init" = x"yes" -a x"$ac_cv_header_linux_inotify_h" = x"yes"; then
     SMB_ENABLE(sys_notify_inotify, YES)
 fi
diff --git a/source4/ntvfs/sysdep/inotify.c b/source4/ntvfs/sysdep/inotify.c
index e4e7c44..68653d6 100644
--- a/source4/ntvfs/sysdep/inotify.c
+++ b/source4/ntvfs/sysdep/inotify.c
@@ -29,6 +29,10 @@
 #include "libcli/raw/smb.h"
 #include "param/param.h"
 
+#if HAVE_SYS_INOTIFY_H
+#include <sys/inotify.h>
+#else
+/* for older glibc varients - we can remove this eventually */
 #include <linux/inotify.h>
 #include <asm/unistd.h>
 
@@ -51,6 +55,7 @@ static int inotify_rm_watch(int fd, int wd)
 	return syscall(__NR_inotify_rm_watch, fd, wd);
 }
 #endif
+#endif
 
 
 /* older glibc headers don't have these defines either */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list