Changeset

12884:f5a75aaa8a25

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.
author Kim Alvefur <zash@zash.se>
date Fri, 10 Feb 2023 00:37:05 +0100
parents 12883:0d5868a9e641
children 12886:686c3cdd4775
files util-src/poll.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util-src/poll.c	Thu Feb 09 22:58:01 2023 +0000
+++ b/util-src/poll.c	Fri Feb 10 00:37:05 2023 +0100
@@ -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