diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-02-17 08:08:10 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-02-17 10:46:42 +0100 |
commit | 96135c7eb3d39bc8dcc71bfefe6f67027a4efa08 (patch) | |
tree | 5b191da60a96d19dafe929279f2aec2a99c2ed0a /scripts/kwboot.c | |
parent | d2a7ff5b7875cc7627bba5098d71ce6a133c4da0 (diff) | |
download | barebox-96135c7eb3d39bc8dcc71bfefe6f67027a4efa08.tar.gz barebox-96135c7eb3d39bc8dcc71bfefe6f67027a4efa08.tar.xz |
kwboot: add missing header to fix musl build
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>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20230217070810.3353123-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts/kwboot.c')
-rw-r--r-- | scripts/kwboot.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/kwboot.c b/scripts/kwboot.c index 1cbb456935..2a4f6bc5fc 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 |