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