From 8e72374feb08110e407e008b6d4a158158f9fcf1 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 21 Jan 2022 18:01:23 +0100 Subject: [PATCH] sandbox: eth-raw: fix building with musl library MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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ć Signed-off-by: Heinrich Schuchardt Tested-by: Milan P. Stanić --- 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 */ +#define _GNU_SOURCE + #include #include #include -- 2.39.5