diff options
| author | Roy Marples <roy@marples.name> | 2015-03-04 16:40:21 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2015-03-04 16:40:21 +0000 |
| commit | 804d1ead10bc7c120aabf747fbd2b595ca335278 (patch) | |
| tree | 10ea967453d8dc6ad415c36264c100ba5a7d3663 /configure | |
| parent | 8c3d363e8bb4954f246af159cb592b4f362a39a8 (diff) | |
| download | dhcpcd-804d1ead10bc7c120aabf747fbd2b595ca335278.tar.xz | |
Test for kqueue1 or set O_CLOEXEC on the kqueue fd.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -790,6 +790,22 @@ else fi if [ -z "$POLL" ]; then + printf "Testing for kqueue1 ... " + cat <<EOF >_kqueue.c +#include <sys/event.h> +int main(void) { + return kqueue1(0); +} +EOF + if $XCC _kqueue.c -o _kqueue 2>&3; then + POLL=kqueue1 + echo "yes" + else + echo "no" + fi + rm -f _kqueue.c _kqueue +fi +if [ -z "$POLL" ]; then printf "Testing for kqueue ... " cat <<EOF >_kqueue.c #include <sys/event.h> @@ -869,6 +885,10 @@ EOF rm -f _pselect.c _pselect fi case "$POLL" in +kqueue1) + echo "#define HAVE_KQUEUE" >>$CONFIG_H + echo "#define HAVE_KQUEUE1" >>$CONFIG_H + ;; kqueue) echo "#define HAVE_KQUEUE" >>$CONFIG_H ;; |
