From: Andrew Tridgell Date: Thu, 30 Oct 2008 19:30:04 +0000 (-0700) Subject: use glibc sys/inotify.h header X-Git-Tag: samba-4.0.0alpha6~604^2~1 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=a9fed0955c5e332120fc6f778065551f7dd7ea86;p=ira%2Fwip.git 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 --- diff --git a/source3/configure.in b/source3/configure.in index a37e97c9da6..a59fe32aff1 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2489,7 +2489,7 @@ if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then fi AC_CACHE_CHECK([for inotify support],samba_cv_HAVE_INOTIFY,[ -AC_CHECK_HEADERS(linux/inotify.h asm/unistd.h) +AC_CHECK_HEADERS(linux/inotify.h asm/unistd.h sys/inotify.h) AC_CHECK_FUNCS(inotify_init) AC_HAVE_DECL(__NR_inotify_init, [#include ]) ], diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c index c6c12a9cd2d..8237e4ab0bc 100644 --- a/source3/smbd/notify_inotify.c +++ b/source3/smbd/notify_inotify.c @@ -25,6 +25,10 @@ #ifdef HAVE_INOTIFY +#if HAVE_SYS_INOTIFY_H +#include +#else + #ifdef HAVE_ASM_TYPES_H #include #endif @@ -57,7 +61,7 @@ static int inotify_rm_watch(int fd, int wd) #include #endif - +#endif /* older glibc headers don't have these defines either */ #ifndef IN_ONLYDIR