summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2015-03-04 15:47:04 +0000
committerRoy Marples <roy@marples.name>2015-03-04 15:47:04 +0000
commit8c3d363e8bb4954f246af159cb592b4f362a39a8 (patch)
tree40e24c99bfb545ae0d504888db2512ffbf79880b /configure
parent8dc5723bceb5f01f26eb3170e1690c176c93d9ed (diff)
downloaddhcpcd-8c3d363e8bb4954f246af159cb592b4f362a39a8.tar.xz
Support kqueue(2).
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure b/configure
index 697e368c..7b0ff835 100755
--- a/configure
+++ b/configure
@@ -790,6 +790,22 @@ else
fi
if [ -z "$POLL" ]; then
+ printf "Testing for kqueue ... "
+ cat <<EOF >_kqueue.c
+#include <sys/event.h>
+int main(void) {
+ return kqueue();
+}
+EOF
+ if $XCC _kqueue.c -o _kqueue 2>&3; then
+ POLL=kqueue
+ echo "yes"
+ else
+ echo "no"
+ fi
+ rm -f _kqueue.c _kqueue
+fi
+if [ -z "$POLL" ]; then
printf "Testing for epoll ... "
cat <<EOF >_epoll.c
#ifdef __linux__
@@ -853,6 +869,9 @@ EOF
rm -f _pselect.c _pselect
fi
case "$POLL" in
+kqueue)
+ echo "#define HAVE_KQUEUE" >>$CONFIG_H
+ ;;
epoll)
echo "#define HAVE_EPOLL" >>$CONFIG_H
;;