diff -Naur samba-3.0.28.orig/source/configure.in samba-3.0.28/source/configure.in --- samba-3.0.28.orig/source/configure.in 2007-11-21 04:58:01.000000000 +0100 +++ samba-3.0.28/source/configure.in 2008-02-19 17:56:52.383852151 +0100 @@ -2541,7 +2541,7 @@ 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 -Naur samba-3.0.28.orig/source/include/config.h.in samba-3.0.28/source/include/config.h.in --- samba-3.0.28.orig/source/include/config.h.in 2007-12-10 17:04:29.000000000 +0100 +++ samba-3.0.28/source/include/config.h.in 2008-02-19 17:58:05.092981395 +0100 @@ -685,6 +685,9 @@ /* Whether kernel has inotify support */ #undef HAVE_INOTIFY +/* Whether system libc defines the inotify_init function */ +#undef HAVE_INOTIFY_INIT + /* Whether int16 typedef is included by rpc/rpc.h */ #undef HAVE_INT16_FROM_RPC_RPC_H diff -Naur samba-3.0.28.orig/source/smbd/notify_inotify.c samba-3.0.28/source/smbd/notify_inotify.c --- samba-3.0.28.orig/source/smbd/notify_inotify.c 2007-11-15 04:15:04.000000000 +0100 +++ samba-3.0.28/source/smbd/notify_inotify.c 2008-02-19 17:56:52.387155138 +0100 @@ -30,10 +30,12 @@ #include #endif +#ifndef HAVE_INOTIFY_INIT + #include #include -#ifndef HAVE_INOTIFY_INIT + /* glibc doesn't define these functions yet (as of March 2006) */ @@ -51,6 +53,10 @@ { return syscall(__NR_inotify_rm_watch, fd, wd); } +#else + +#include + #endif