configure.ac: tweak inotify check

Our check for inotify_init1() being defined is broken.  We happily
declare that inotify is supported, even if the check fails.

This was originally intended to check for inotify_init1 in the libc so
that we could fall back to inotify_init if it was not yet defined.

FreeBSD has a libinotify that emulates the inotify API via kqueue.  It
installs a <sys/inotify.h> header and requires linking to -linotify.  We
don't want to falsely detect working inotify in this case.

Treat the lack of inotify_init1() in the libc as a lack of inotify
support.  This requires only a new libc -- we still support old kernels:
in the case that inotify1_init() fails, we fall back to inotify_init().

https://bugzilla.gnome.org/show_bug.cgi?id=724330
This commit is contained in:
Ryan Lortie
2014-02-13 18:26:07 -05:00
parent db83b8ac4c
commit 450e7b1036
3 changed files with 3 additions and 7 deletions

View File

@@ -196,11 +196,8 @@ gboolean _ik_startup (void (*cb)(ik_event_t *event))
initialized = TRUE;
#ifdef HAVE_INOTIFY_INIT1
inotify_instance_fd = inotify_init1 (IN_CLOEXEC);
#else
inotify_instance_fd = -1;
#endif
if (inotify_instance_fd < 0)
inotify_instance_fd = inotify_init ();