supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* [PATCH] runit.c: add sys/select.h include
@ 2020-04-08 14:12 Arsen
  0 siblings, 0 replies; only message in thread
From: Arsen @ 2020-04-08 14:12 UTC (permalink / raw)
  To: supervision; +Cc: Arsen

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
@@ -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>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-08 14:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 14:12 [PATCH] runit.c: add sys/select.h include Arsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).