From 5f32812f42e3da48e2fbca0f974a9a4a5ba7a45c Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 16 Oct 2009 13:24:39 -0400 Subject: [PATCH] Bug 23957 - Support inotify on older kernels Previously we detected glibc support at compile time and used it unconditionally; better to try it and fall back, this way we continue to run on older kernels when compiled for newer ones. --- bus/dir-watch-inotify.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/bus/dir-watch-inotify.c b/bus/dir-watch-inotify.c index ee580d7..6350511 100644 --- a/bus/dir-watch-inotify.c +++ b/bus/dir-watch-inotify.c @@ -99,6 +99,8 @@ bus_watch_directory (const char *dir, BusContext *context) if (inotify_fd == -1) { #ifdef HAVE_INOTIFY_INIT1 inotify_fd = inotify_init1 (IN_CLOEXEC); + if (inotify_fd < 0) + inotify_fd = inotify_init (); #else inotify_fd = inotify_init (); #endif -- 1.6.2.5