From 26e37213592a6516c9a6cc93ec13fdaf8c20b868 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 14 May 2022 17:39:56 +0100 Subject: [PATCH] ITS#9847 fix kqueue detection on MacOSX --- configure | 9 ++++++++- configure.ac | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/configure b/configure index c794eaa0c6..8b2320d749 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Id: 675bdc74d151492f563c92ffde73705c0104feea . +# From configure.ac Id: a347593fe91b41b2a054a00420bbb35f39a0ec90 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -16033,6 +16033,13 @@ $as_echo "no" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +$ac_includes_default +#ifdef HAVE_SYS_EVENT_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif int main(int argc, char **argv) { int kqfd = kqueue(); diff --git a/configure.ac b/configure.ac index a347593fe9..c9c2978449 100644 --- a/configure.ac +++ b/configure.ac @@ -1030,7 +1030,14 @@ dnl ---------------------------------------------------------------- AC_CHECK_HEADERS( sys/event.h ) if test "${ac_cv_header_sys_event_h}" = yes; then AC_MSG_CHECKING(for kqueue system call) -AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(int argc, char **argv) +AC_RUN_IFELSE([AC_LANG_SOURCE([[$ac_includes_default +#ifdef HAVE_SYS_EVENT_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +int main(int argc, char **argv) { int kqfd = kqueue(); exit (kqfd == -1 ? 1 : 0); -- 2.47.3