diff options
author | Colin Walters <walters@verbum.org> | 2010-03-16 12:16:33 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-03-16 12:21:52 -0400 |
commit | 8586e83a5c2a0e53964ad6c26b452e2b7709085f (patch) | |
tree | 7d15b923a8c066dec94d612305fa025fe6073e0f /bus/dir-watch-inotify.c | |
parent | 3c657579a0545af63b0286c3c901f7812149f6dc (diff) | |
download | dbus-8586e83a5c2a0e53964ad6c26b452e2b7709085f.tar.gz dbus-8586e83a5c2a0e53964ad6c26b452e2b7709085f.tar.bz2 dbus-8586e83a5c2a0e53964ad6c26b452e2b7709085f.zip |
Support inotify on older kernels
https://bugs.freedesktop.org/show_bug.cgi?id=23957
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.
Diffstat (limited to 'bus/dir-watch-inotify.c')
-rw-r--r-- | bus/dir-watch-inotify.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bus/dir-watch-inotify.c b/bus/dir-watch-inotify.c index c98e6fcb..094993bb 100644 --- a/bus/dir-watch-inotify.c +++ b/bus/dir-watch-inotify.c @@ -226,6 +226,11 @@ _init_inotify (BusContext *context) { #ifdef HAVE_INOTIFY_INIT1 inotify_fd = inotify_init1 (IN_CLOEXEC); + /* This ensures we still run on older Linux kernels. + * https://bugs.freedesktop.org/show_bug.cgi?id=23957 + */ + if (inotify_fd < 0) + inotify_fd = inotify_init (); #else inotify_fd = inotify_init (); #endif |