summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2021-01-28 17:26:20 +0000
committerRoy Marples <roy@marples.name>2021-01-28 17:26:20 +0000
commit701a9d031e0f97d7024639a9fbeaa35afb1bbb83 (patch)
tree197e6e249f3d9cfee771fddecf807e1f0b71a827 /configure
parent07af15970a386e49db4b4e5c443e702fbca2f275 (diff)
downloaddhcpcd-701a9d031e0f97d7024639a9fbeaa35afb1bbb83.tar.xz
Linux: Implement epoll(7) for eloop (again)
eloop allows for O(1) processing of active fd's. The problems with the prior implementation have now been fixed.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index c8f15749..091815ab 100755
--- a/configure
+++ b/configure
@@ -1260,6 +1260,23 @@ EOF
fi
if [ -z "$POLL" ]; then
+ printf "Testing for epoll ... "
+ cat <<EOF >_epoll.c
+#include <sys/epoll.h>
+int main(void) {
+ return epoll_create1(EPOLL_CLOEXEC);
+}
+EOF
+ if $XCC _epoll.c -o _epoll 2>&3; then
+ POLL=epoll
+ echo "yes"
+ else
+ echo "no"
+ fi
+ rm -f _epoll.c _epoll
+fi
+
+if [ -z "$POLL" ]; then
printf "Testing for ppoll ... "
cat <<EOF >_ppoll.c
#include <poll.h>
@@ -1322,6 +1339,9 @@ kqueue1)
kqueue)
echo "#define HAVE_KQUEUE" >>$CONFIG_H
;;
+epoll)
+ echo "#define HAVE_EPOLL" >>$CONFIG_H
+ ;;
ppoll)
echo "#define HAVE_PPOLL" >>$CONFIG_H
;;