summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
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
;;