1b78249
diff -u -r dbus-1.2.14/bus/dir-watch-inotify.c dbus-1.2.14.fd-leak/bus/dir-watch-inotify.c
1b78249
--- dbus-1.2.14/bus/dir-watch-inotify.c	2009-04-17 15:45:29.000000000 -0400
1b78249
+++ dbus-1.2.14.fd-leak/bus/dir-watch-inotify.c	2009-06-27 18:38:54.966881736 -0400
1b78249
@@ -98,7 +98,11 @@
1b78249
   _dbus_assert (dir != NULL);
1b78249
 
1b78249
   if (inotify_fd == -1) {
1b78249
+#ifdef HAVE_INOTIFY_INIT1
1b78249
+     inotify_fd = inotify_init1 (IN_CLOEXEC);
1b78249
+#else
1b78249
      inotify_fd = inotify_init ();
1b78249
+#endif
1b78249
      if (inotify_fd <= 0) {
1b78249
       _dbus_warn ("Cannot initialize inotify\n");
1b78249
       goto out;
1b78249
diff -u -r dbus-1.2.14/configure.in dbus-1.2.14.fd-leak/configure.in
1b78249
--- dbus-1.2.14/configure.in	2009-05-06 12:51:19.000000000 -0400
1b78249
+++ dbus-1.2.14.fd-leak/configure.in	2009-06-27 18:37:10.787645299 -0400
1b78249
@@ -983,7 +983,7 @@
1b78249
 dnl check if inotify backend is enabled
1b78249
 if test x$have_inotify = xyes; then
1b78249
    AC_DEFINE(DBUS_BUS_ENABLE_INOTIFY,1,[Use inotify])
1b78249
-
1b78249
+   AC_CHECK_FUNCS(inotify_init1)
1b78249
 fi
1b78249
 
1b78249
 AM_CONDITIONAL(DBUS_BUS_ENABLE_INOTIFY, test x$have_inotify = xyes)