From: Marty Plummer Date: Fri, 11 Aug 2017 07:11:39 +0000 (-0500) Subject: tools/mkimage: fix musl build X-Git-Tag: v18.06.0-rc1~2364 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9ebb23cf51c78802dc01cdbf37f65440c5325dab;p=oweals%2Fopenwrt.git tools/mkimage: fix musl build Taken from: http://git.denx.de/?p=u-boot.git;a=commit;h=26e355d131a6b56ea78a156c1cee4f6ba0500b37 Signed-off-by: Marty Plummer --- diff --git a/tools/mkimage/patches/110-fix_musl_build.patch b/tools/mkimage/patches/110-fix_musl_build.patch new file mode 100644 index 0000000000..13f7ab0431 --- /dev/null +++ b/tools/mkimage/patches/110-fix_musl_build.patch @@ -0,0 +1,67 @@ +From: Jörg Krause +Date: Wed, 22 Apr 2015 19:36:22 +0000 (+0200) +Subject: Fix musl build +X-Git-Tag: v2015.07-rc2~281 +X-Git-Url: http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=26e355d131a6b56ea78a156c1cee4f6ba0500b37;hp=1cdd9412002000aafcfb6f10cd02069adc66ba49 + +Fix musl build + +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 +--- + +diff --git a/include/image.h b/include/image.h +index 3844be6..60b924a 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 1173eea..daa02a7 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 3e15b4e..b7874f4 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 3482951..9ce7a77 100644 +--- a/tools/proftool.c ++++ b/tools/proftool.c +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + #include + #include