diff util-src/poll.c @ 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 1f6f05a98fcd
children a187600ec7d6
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