diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/configure.in | 2 | ||||
-rw-r--r-- | source3/smbd/notify_inotify.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/source3/configure.in b/source3/configure.in index 3ab2166095..1c326a8ea2 100644 --- a/source3/configure.in +++ b/source3/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 <asm/unistd.h>]) ], samba_cv_HAVE_INOTIFY=yes, diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c index 73cee440d4..fa0f0ed51d 100644 --- a/source3/smbd/notify_inotify.c +++ b/source3/smbd/notify_inotify.c @@ -29,10 +29,12 @@ #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) */ @@ -50,6 +52,10 @@ static int inotify_rm_watch(int fd, int wd) { return syscall(__NR_inotify_rm_watch, fd, wd); } +#else + +#include <sys/inotify.h> + #endif |