supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / 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>
-- 
2.24.1



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

only message in thread, back to index

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

supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit

Archives are clonable: git clone --mirror http://inbox.vuxu.org/supervision

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.supervision.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git