projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a4763e
)
Fall back to inotify_init if inotify_init1 does not work
author
Josselin Mouette
<joss@debian.org>
Wed, 23 Sep 2009 16:39:45 +0000
(18:39 +0200)
committer
Josselin Mouette
<joss@debian.org>
Wed, 23 Sep 2009 16:39:45 +0000
(18:39 +0200)
This fixes monitoring failing to work when glib is built on a 2.6.27+
kernel but run on an older one.
http://bugs.debian.org/544354
https://bugzilla.gnome.org/show_bug.cgi?id=593775
gio/inotify/inotify-kernel.c
patch
|
blob
|
history
diff --git
a/gio/inotify/inotify-kernel.c
b/gio/inotify/inotify-kernel.c
index b0b85ae4b818057adb7fcbfe921312a4f60afb93..6e559a7b8b7e47629456d20b85f5836e46cfafcf 100644
(file)
--- a/
gio/inotify/inotify-kernel.c
+++ b/
gio/inotify/inotify-kernel.c
@@
-193,8
+193,10
@@
gboolean _ik_startup (void (*cb)(ik_event_t *event))
#ifdef HAVE_INOTIFY_INIT1
inotify_instance_fd = inotify_init1 (IN_CLOEXEC);
#else
- inotify_instance_fd =
inotify_init ()
;
+ inotify_instance_fd =
-1
;
#endif
+ if (inotify_instance_fd < 0)
+ inotify_instance_fd = inotify_init ();
if (inotify_instance_fd < 0)
return FALSE;