]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: eth-raw: fix building with musl library
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 21 Jan 2022 17:01:23 +0000 (18:01 +0100)
committerSimon Glass <sjg@chromium.org>
Tue, 25 Jan 2022 21:02:38 +0000 (14:02 -0700)
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

index 6a8d8097562bf0d87337361a37306f93c41a3d03..e59b96be5fb8b298f978d04b3bb96122ec7da11a 100644 (file)
@@ -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>