diff options
| author | Roy Marples <roy@marples.name> | 2015-03-04 15:47:04 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2015-03-04 15:47:04 +0000 |
| commit | 8c3d363e8bb4954f246af159cb592b4f362a39a8 (patch) | |
| tree | 40e24c99bfb545ae0d504888db2512ffbf79880b /configure | |
| parent | 8dc5723bceb5f01f26eb3170e1690c176c93d9ed (diff) | |
| download | dhcpcd-8c3d363e8bb4954f246af159cb592b4f362a39a8.tar.xz | |
Support kqueue(2).
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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 ;; |
