aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-02-10 00:37:05 +0100
committerKim Alvefur <zash@zash.se>2023-02-10 00:37:05 +0100
commitbf35a39a15c0b092517943936779baf0297e1248 (patch)
tree3a6b8a7ab733e29054a03d1fd451131ea0f1d5bc
parentfbfe255e12c980024d4147a77c5de1c3f727016c (diff)
downloadprosody-bf35a39a15c0b092517943936779baf0297e1248.tar.gz
prosody-bf35a39a15c0b092517943936779baf0297e1248.zip
util.poll: Include unistd.h only for epoll
This defines close(), which is only used with epoll, hence we don't need to include it when building in poll or select mode.
-rw-r--r--util-src/poll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util-src/poll.c b/util-src/poll.c
index d7c1f9e1..7ea2e140 100644
--- a/util-src/poll.c
+++ b/util-src/poll.c
@@ -8,7 +8,6 @@
*
*/
-#include <unistd.h>
#include <string.h>
#include <errno.h>
@@ -24,6 +23,7 @@
#endif
#ifdef USE_EPOLL
+#include <unistd.h>
#include <sys/epoll.h>
#ifndef MAX_EVENTS
#define MAX_EVENTS 64