mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-09 07:18:03 +02:00
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.
This commit is contained in:
parent
3c657579a0
commit
8586e83a5c
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue