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
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 <asm/unistd.h>])
],
#ifdef HAVE_INOTIFY
+#if HAVE_SYS_INOTIFY_H
+#include <sys/inotify.h>
+#else
+
#ifdef HAVE_ASM_TYPES_H
#include <asm/types.h>
#endif
#include <sys/inotify.h>
#endif
-
+#endif
/* older glibc headers don't have these defines either */
#ifndef IN_ONLYDIR