summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-11-05 01:08:11 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2020-11-05 01:08:11 -0500
commitdce440602dc4b6bc5fe890d1736bd2d354cb052b (patch)
tree49563c465433e53826aff6f44d9736b2c3aa934b
parent520bffcd243db3a5e74401f232674a075ba69b67 (diff)
downloadlighttpd-git-dce440602dc4b6bc5fe890d1736bd2d354cb052b.tar.gz
[core] stat_cache preprocessor paranoia
-rw-r--r--src/stat_cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stat_cache.c b/src/stat_cache.c
index f87fc984..b1636e37 100644
--- a/src/stat_cache.c
+++ b/src/stat_cache.c
@@ -132,7 +132,8 @@ static void * stat_cache_sptree_find(splay_tree ** const sptree,
* different files recently accessed and part of the stat_cache.
*/
-#ifdef HAVE_SYS_INOTIFY_H
+#if defined(HAVE_SYS_INOTIFY_H) \
+ && !(defined(HAVE_SYS_EVENT_H) && defined(HAVE_KQUEUE))
#include <sys/inotify.h>
@@ -157,6 +158,7 @@ typedef enum FAMCodes { /*(copied from fam.h to define arbitrary enum values)*/
} FAMCodes;
#elif defined HAVE_SYS_EVENT_H && defined HAVE_KQUEUE
+#undef HAVE_SYS_INOTIFY_H
#include <sys/event.h>
#include <sys/time.h>