Fix inotify detection
authorVolker Lendecke <vl@samba.org>
Mon, 25 Feb 2008 11:52:55 +0000 (12:52 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 25 Feb 2008 11:57:41 +0000 (12:57 +0100)
Bug 5271 -- thanks to Tiziano Müller

source/configure.in
source/smbd/notify_inotify.c

index d3fb63bb5376f477d17707b000723cde4a904971..9c31de4bf3b3486226fe99758c4b5497b9480a6d 100644 (file)
@@ -2541,7 +2541,7 @@ fi
 
 AC_CACHE_CHECK([for inotify support],samba_cv_HAVE_INOTIFY,[
 AC_CHECK_HEADERS(linux/inotify.h asm/unistd.h)
-AC_CHECK_FUNC(inotify_init)
+AC_CHECK_FUNCS(inotify_init)
 AC_HAVE_DECL(__NR_inotify_init, [#include <asm/unistd.h>])
 ],
 samba_cv_HAVE_INOTIFY=yes,
index 1b1bad7e966896e44b2cc85cbdba862f3799133d..a9eb221cb9c5e5ad4fb882ee6b38b836494d6f12 100644 (file)
 #include <asm/types.h>
 #endif
 
+#ifndef HAVE_INOTIFY_INIT
+
 #include <linux/inotify.h>
 #include <asm/unistd.h>
 
-#ifndef HAVE_INOTIFY_INIT
+
 /*
   glibc doesn't define these functions yet (as of March 2006)
 */
@@ -51,6 +53,10 @@ static int inotify_rm_watch(int fd, int wd)
 {
        return syscall(__NR_inotify_rm_watch, fd, wd);
 }
+#else
+
+#include <sys/inotify.h>
+
 #endif