diff options
author | Jörg Krause | 2015-04-22 21:36:22 +0200 |
---|---|---|
committer | Tom Rini | 2015-05-08 17:24:17 -0400 |
commit | 26e355d131a6b56ea78a156c1cee4f6ba0500b37 (patch) | |
tree | 7b4c43d1c341b58ee5d7d930af6512c55979e4ef | |
parent | 1cdd9412002000aafcfb6f10cd02069adc66ba49 (diff) |
Fix musl build
This patch fixes cross-compiling U-Boot tools with the musl C library:
* including <sys/types.h> is needed for ulong
* defining _GNU_SOURCE is needed for loff_t
Tested for target at91sam9261ek_dataflash_cs3.
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Cc: Tom Rini <trini@konsulko.com>
-rw-r--r-- | include/image.h | 1 | ||||
-rw-r--r-- | tools/env/fw_env.c | 2 | ||||
-rw-r--r-- | tools/imagetool.h | 1 | ||||
-rw-r--r-- | tools/proftool.c | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/include/image.h b/include/image.h index 3844be67d8e..60b924a5b6f 100644 --- a/include/image.h +++ b/include/image.h @@ -23,6 +23,7 @@ struct lmb; #ifdef USE_HOSTCC +#include <sys/types.h> /* 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 1173eea7820..daa02a760e3 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 <errno.h> #include <env_flags.h> #include <fcntl.h> diff --git a/tools/imagetool.h b/tools/imagetool.h index 3e15b4e22b9..b7874f47cd2 100644 --- a/tools/imagetool.h +++ b/tools/imagetool.h @@ -16,6 +16,7 @@ #include <stdlib.h> #include <string.h> #include <sys/stat.h> +#include <sys/types.h> #include <time.h> #include <unistd.h> #include <u-boot/sha1.h> diff --git a/tools/proftool.c b/tools/proftool.c index 348295198cd..9ce7a7796e7 100644 --- a/tools/proftool.c +++ b/tools/proftool.c @@ -16,6 +16,7 @@ #include <string.h> #include <unistd.h> #include <sys/param.h> +#include <sys/types.h> #include <compiler.h> #include <trace.h> |