diff --git a/configure.ac b/configure.ac index 9012d0b284..d8c1df3b78 100644 --- a/configure.ac +++ b/configure.ac @@ -1016,7 +1016,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);