[PATCH] runit.c: add sys/select.h include

From: Arsen <arsen_at_managarm.org>
Date: Wed, 8 Apr 2020 16:12:17 +0200

runit.c seems to rely on a transitive dependency between sys/types.h and
sys/select.h that exists on some systems such as Linux.
When we tried porting runit to managarm we ran into an issue related to
it, where fd_set and timeval weren't declared at time of use in runit.c.
Consulting the Open Group's POSIX specification, it shows that
sys/types.h does not need to specify either of the two, and that they
are in sys/select.h. This patch corrects the include.
 src/runit.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/src/runit.c b/src/runit.c
index 48620b3..976495b 100644
--- a/src/runit.c
+++ b/src/runit.c
_at_@ -2,6 +2,7 @@
 #include <sys/reboot.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
+#include <sys/select.h>
 #include <signal.h>
 #include <unistd.h>
 #include <fcntl.h>
Received on Wed Apr 08 2020 - 14:12:17 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC