From 9de903c2d6f3f29a576b3a93d3a78388ff5e2bbb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rg=20Krause?= Date: Wed, 22 Apr 2015 21:36:22 +0200 Subject: [PATCH 1/1] Fix musl build MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch fixes cross-compiling U-Boot tools with the musl C library: * including is needed for ulong * defining _GNU_SOURCE is needed for loff_t Tested for target at91sam9261ek_dataflash_cs3. Signed-off-by: Jörg Krause Cc: Tom Rini --- include/image.h | 1 + tools/env/fw_env.c | 2 ++ tools/imagetool.h | 1 + tools/proftool.c | 1 + 4 files changed, 5 insertions(+) diff --git a/include/image.h b/include/image.h index 3844be67d8..60b924a5b6 100644 --- a/include/image.h +++ b/include/image.h @@ -23,6 +23,7 @@ struct lmb; #ifdef USE_HOSTCC +#include /* new uImage format support enabled on host */ #define CONFIG_FIT 1 diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index 1173eea782..daa02a760e 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -8,6 +8,8 @@ * SPDX-License-Identifier: GPL-2.0+ */ +#define _GNU_SOURCE + #include #include #include diff --git a/tools/imagetool.h b/tools/imagetool.h index 3e15b4e22b..b7874f47cd 100644 --- a/tools/imagetool.h +++ b/tools/imagetool.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/proftool.c b/tools/proftool.c index 348295198c..9ce7a7796e 100644 --- a/tools/proftool.c +++ b/tools/proftool.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include -- 2.39.2