1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
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 <asm/unistd.h>])
],
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 <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)
*/
@@ -51,6 +53,10 @@
{
return syscall(__NR_inotify_rm_watch, fd, wd);
}
+#else
+
+#include <sys/inotify.h>
+
#endif
|