mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] kwboot: add missing header to fix musl build
Date: Fri, 17 Feb 2023 08:08:10 +0100	[thread overview]
Message-ID: <20230217070810.3353123-1-a.fatoum@pengutronix.de> (raw)

Building kwboot for musl instead of glibc results in a couple of errors:

  error: unknown type name 'fd_set'
  error: storage size of 'tv' isn't known
    142 |         struct timeval tv;
  warning: implicit declaration of function 'FD_ZERO'
  warning: implicit declaration of function 'FD_SET'
  warning: implicit declaration of function 'select'
  warning: implicit declaration of function 'FD_ISSET'

POSIX specifies[1] that all these symbols shall be defined by <sys/select.h>,
so include this missing header.

[1]: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/select.h.html

Reported-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/openembedded-core/Y91ObtiQCtnpGaRH@mail.local/
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 scripts/kwboot.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/kwboot.c b/scripts/kwboot.c
index 1cbb456935f2..2a4f6bc5fc58 100644
--- a/scripts/kwboot.c
+++ b/scripts/kwboot.c
@@ -22,6 +22,7 @@
 #include <termios.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
+#include <sys/select.h>
 
 /*
  * Marvell BootROM UART Sensing
-- 
2.30.2




             reply	other threads:[~2023-02-17  7:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17  7:08 Ahmad Fatoum [this message]
2023-02-17  9:03 ` Marco Felsch
2023-02-17  9:46 ` Sascha Hauer

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=20230217070810.3353123-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=alexandre.belloni@bootlin.com \
    --cc=barebox@lists.infradead.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