mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] kwboot: add missing header to fix musl build
@ 2023-02-17  7:08 Ahmad Fatoum
  2023-02-17  9:03 ` Marco Felsch
  2023-02-17  9:46 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2023-02-17  7:08 UTC (permalink / raw)
  To: barebox; +Cc: Alexandre Belloni, Ahmad Fatoum

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH master] kwboot: add missing header to fix musl build
  2023-02-17  7:08 [PATCH master] kwboot: add missing header to fix musl build Ahmad Fatoum
@ 2023-02-17  9:03 ` Marco Felsch
  2023-02-17  9:46 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Marco Felsch @ 2023-02-17  9:03 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox, Alexandre Belloni

On 23-02-17, Ahmad Fatoum wrote:
> 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>

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH master] kwboot: add missing header to fix musl build
  2023-02-17  7:08 [PATCH master] kwboot: add missing header to fix musl build Ahmad Fatoum
  2023-02-17  9:03 ` Marco Felsch
@ 2023-02-17  9:46 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2023-02-17  9:46 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox, Alexandre Belloni

On Fri, Feb 17, 2023 at 08:08:10AM +0100, Ahmad Fatoum wrote:
> 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

Applied, thanks

Sascha

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

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-17  9:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-17  7:08 [PATCH master] kwboot: add missing header to fix musl build Ahmad Fatoum
2023-02-17  9:03 ` Marco Felsch
2023-02-17  9:46 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox