fix bug #5395: handle old systems where inotify_init1 is not available

This commit is contained in:
Ozkan Sezer
2020-12-13 15:32:24 +03:00
parent ee85a41a32
commit b6e63625c8
6 changed files with 86 additions and 17 deletions

View File

@@ -1222,6 +1222,12 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
endif()
check_include_file("libudev.h" HAVE_LIBUDEV_H)
check_include_file("sys/inotify.h" HAVE_SYS_INOTIFY_H)
check_symbol_exists(inotify_init "sys/inotify.h" HAVE_INOTIFY_INIT)
check_symbol_exists(inotify_init1 "sys/inotify.h" HAVE_INOTIFY_INIT1)
if(HAVE_SYS_INOTIFY_H AND HAVE_INOTIFY_INIT)
set(HAVE_INOTIFY 1)
endif()
if(PKG_CONFIG_FOUND)
pkg_search_module(DBUS dbus-1 dbus)