All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] sandbox: eth-raw: fix building with musl library
@ 2022-01-21 17:01 Heinrich Schuchardt
  2022-01-21 20:12 ` Milan P. Stanić
  2022-01-26 15:36 ` Simon Glass
  0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2022-01-21 17:01 UTC (permalink / raw)
  To: Simon Glass; +Cc: u-boot, Heinrich Schuchardt, Milan P . Stanić

The definition of struct udphdr in include netinet/udp.h in the
musl library differs from the definition in the glibc library.

To use the same definition with musl the symbol _GNU_SOURCE has
to be defined.

Reported-by: Milan P. Stanić <mps@arvanta.net>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 arch/sandbox/cpu/eth-raw-os.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/sandbox/cpu/eth-raw-os.c b/arch/sandbox/cpu/eth-raw-os.c
index 6a8d809756..e59b96be5f 100644
--- a/arch/sandbox/cpu/eth-raw-os.c
+++ b/arch/sandbox/cpu/eth-raw-os.c
@@ -4,6 +4,8 @@
  * Copyright (c) 2015-2018 Joe Hershberger <joe.hershberger@ni.com>
  */
 
+#define _GNU_SOURCE
+
 #include <asm/eth-raw-os.h>
 #include <errno.h>
 #include <fcntl.h>
-- 
2.33.1


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

* Re: [PATCH 1/1] sandbox: eth-raw: fix building with musl library
  2022-01-21 17:01 [PATCH 1/1] sandbox: eth-raw: fix building with musl library Heinrich Schuchardt
@ 2022-01-21 20:12 ` Milan P. Stanić
  2022-01-26 15:36 ` Simon Glass
  1 sibling, 0 replies; 3+ messages in thread
From: Milan P. Stanić @ 2022-01-21 20:12 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Simon Glass, u-boot

Hi,

it works and build pass without error or warning.
Tested on alpine edge aarch64 bare metal.

Thank you

On Fri, 2022-01-21 at 18:01, Heinrich Schuchardt wrote:
> The definition of struct udphdr in include netinet/udp.h in the
> musl library differs from the definition in the glibc library.
> 
> To use the same definition with musl the symbol _GNU_SOURCE has
> to be defined.
> 
> Reported-by: Milan P. Stanić <mps@arvanta.net>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

Tested-by: Milan P. Stanić <mps@arvanta.net>

> ---
>  arch/sandbox/cpu/eth-raw-os.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/sandbox/cpu/eth-raw-os.c b/arch/sandbox/cpu/eth-raw-os.c
> index 6a8d809756..e59b96be5f 100644
> --- a/arch/sandbox/cpu/eth-raw-os.c
> +++ b/arch/sandbox/cpu/eth-raw-os.c
> @@ -4,6 +4,8 @@
>   * Copyright (c) 2015-2018 Joe Hershberger <joe.hershberger@ni.com>
>   */
>  
> +#define _GNU_SOURCE
> +
>  #include <asm/eth-raw-os.h>
>  #include <errno.h>
>  #include <fcntl.h>
> -- 
> 2.33.1
> 

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

* Re: [PATCH 1/1] sandbox: eth-raw: fix building with musl library
  2022-01-21 17:01 [PATCH 1/1] sandbox: eth-raw: fix building with musl library Heinrich Schuchardt
  2022-01-21 20:12 ` Milan P. Stanić
@ 2022-01-26 15:36 ` Simon Glass
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2022-01-26 15:36 UTC (permalink / raw)
  To: Milan P. Stanić; +Cc: Simon Glass, u-boot, Heinrich Schuchardt

Hi,

it works and build pass without error or warning.
Tested on alpine edge aarch64 bare metal.

Thank you

On Fri, 2022-01-21 at 18:01, Heinrich Schuchardt wrote:
> The definition of struct udphdr in include netinet/udp.h in the
> musl library differs from the definition in the glibc library.
>
> To use the same definition with musl the symbol _GNU_SOURCE has
> to be defined.
>
> Reported-by: Milan P. Stanić <mps@arvanta.net>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

Tested-by: Milan P. Stanić <mps@arvanta.net>

> ---
>  arch/sandbox/cpu/eth-raw-os.c | 2 ++
>  1 file changed, 2 insertions(+)
>
Applied to u-boot-dm, thanks!

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

end of thread, other threads:[~2022-01-26 15:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-21 17:01 [PATCH 1/1] sandbox: eth-raw: fix building with musl library Heinrich Schuchardt
2022-01-21 20:12 ` Milan P. Stanić
2022-01-26 15:36 ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.