diff options
| author | Roy Marples <roy@marples.name> | 2021-01-28 17:26:20 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2021-01-28 17:26:20 +0000 |
| commit | 701a9d031e0f97d7024639a9fbeaa35afb1bbb83 (patch) | |
| tree | 197e6e249f3d9cfee771fddecf807e1f0b71a827 /configure | |
| parent | 07af15970a386e49db4b4e5c443e702fbca2f275 (diff) | |
| download | dhcpcd-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-x | configure | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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 ;; |
