From: Arsen <arsen@managarm.org>
To: supervision@list.skarnet.org
Cc: Arsen <arsen@managarm.org>
Subject: [PATCH] runit.c: add sys/select.h include
Date: Wed, 8 Apr 2020 16:12:17 +0200 [thread overview]
Message-ID: <20200408141216.14120-1-arsen@managarm.org> (raw)
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
reply other threads:[~2020-04-08 14:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200408141216.14120-1-arsen@managarm.org \
--to=arsen@managarm.org \
--cc=supervision@list.skarnet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).