From: Volker Lendecke Date: Mon, 25 Feb 2008 11:52:55 +0000 (+0100) Subject: Fix inotify detection X-Git-Tag: samba-3.2.0pre2~37^2~140 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a1a138b0fe0f2200e5a37a0609481e4340a896c;p=thirdparty%2Fsamba.git Fix inotify detection Bug 5271 -- thanks to Tiziano Müller --- diff --git a/source/configure.in b/source/configure.in index 3ab2166095c..1c326a8ea23 100644 --- a/source/configure.in +++ b/source/configure.in @@ -2362,7 +2362,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 ]) ], samba_cv_HAVE_INOTIFY=yes, diff --git a/source/smbd/notify_inotify.c b/source/smbd/notify_inotify.c index 73cee440d48..fa0f0ed51dc 100644 --- a/source/smbd/notify_inotify.c +++ b/source/smbd/notify_inotify.c @@ -29,10 +29,12 @@ #include #endif +#ifndef HAVE_INOTIFY_INIT + #include #include -#ifndef HAVE_INOTIFY_INIT + /* glibc doesn't define these functions yet (as of March 2006) */ @@ -50,6 +52,10 @@ static int inotify_rm_watch(int fd, int wd) { return syscall(__NR_inotify_rm_watch, fd, wd); } +#else + +#include + #endif