1 From bf738fda390787a10db0c9a4be9fcafd6707a90e Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3 Date: Sat, 18 Apr 2015 08:00:46 +0200
4 Subject: [PATCH 1/1] Fix musl build
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 This patch fixes cross-compiling U-Boot tools with the musl C library:
10 * including <sys/types.h> is needed for ulong
11 * defining _GNU_SOURCE is needed for loff_t
13 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
16 tools/env/fw_env.c | 2 ++
17 tools/imagetool.h | 1 +
18 tools/proftool.c | 1 +
19 4 files changed, 5 insertions(+)
21 diff --git a/include/image.h b/include/image.h
22 index 3844be6..ac2fd6e 100644
28 #include <asm/byteorder.h>
29 +#include <sys/types.h>
31 /* Define this to avoid #ifdefs later on */
33 diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
34 index 1173eea..daa02a7 100644
35 --- a/tools/env/fw_env.c
36 +++ b/tools/env/fw_env.c
38 * SPDX-License-Identifier: GPL-2.0+
44 #include <env_flags.h>
46 diff --git a/tools/imagetool.h b/tools/imagetool.h
47 index 3e15b4e..b7874f4 100644
48 --- a/tools/imagetool.h
49 +++ b/tools/imagetool.h
54 +#include <sys/types.h>
57 #include <u-boot/sha1.h>
58 diff --git a/tools/proftool.c b/tools/proftool.c
59 index 3482951..9ce7a77 100644
60 --- a/tools/proftool.c
61 +++ b/tools/proftool.c
65 #include <sys/param.h>
66 +#include <sys/types.h>