File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,13 +77,13 @@ AC_ARG_ENABLE([dns-tests],
7777
7878if test $status_dns_tests = yes; then
7979 AC_COMPILE_IFELSE (
80- [ AC_LANG_PROGRAM ( [
80+ [ AC_LANG_PROGRAM ( [ [
8181 #include <sys/syscall.h>
82- int x[ ] = { SYS_connect, SYS_sendto, SYS_recvfrom };
83- ] ,
84- [ [ void main(){} ] ] ) ] ,
85- [ ] ,
86- [ status_dns_tests=no] )
82+ int x[ 1 ] = { SYS_connect, SYS_sendto, SYS_recvfrom };
83+ ] ] ,
84+ [ return 0; ] ) ] ,
85+ [ ] ,
86+ [ status_dns_tests=no] )
8787fi
8888
8989AM_CONDITIONAL([ COND_BUILD_FAKEDNS] , [ test "$status_dns_tests" = yes] )
@@ -238,7 +238,24 @@ AC_CHECK_FUNCS([inotify_init kqueue])
238238if test "$ac_cv_header_sys_inotify_h/$ac_cv_func_inotify_init" = yes/yes; then
239239 status_fsevmon=inotify
240240elif test "$ac_cv_header_sys_event_h/$ac_cv_func_kqueue" = yes/yes; then
241- status_fsevmon=kqueue
241+ # The code in src/watcher/kqueue.c relies on kqueue being able to report
242+ # that the file was modified and closed, either directly (via the
243+ # NOTE_CLOSE_WRITE event) or indirectly (looking for NOTE_CLOSE and
244+ # NOTE_WRITE). This code is disabled if neither NOTE_CLOSE nor
245+ # NOTE_CLOSE_WRITE is defined (notable cases: Darwin and NetBSD).
246+ AC_COMPILE_IFELSE (
247+ [ AC_LANG_PROGRAM ( [
248+ #include <sys/event.h>
249+ ] ,
250+ [
251+ #if defined(NOTE_CLOSE) || defined(NOTE_CLOSE_WRITE)
252+ return 0;
253+ #else
254+ # error "Either NOTE_CLOSE or NOTE_CLOSE_WRITE must be defined"
255+ #endif
256+ ] ) ] ,
257+ [ status_fsevmon=kqueue] ,
258+ [ status_fsevmon=none] )
242259else
243260 status_fsevmon=none
244261fi
You can’t perform that action at this time.
0 commit comments