* [U-Boot] [PATCH v2 1/1] Fix musl build
@ 2015-04-22 19:36 Jörg Krause
2015-05-10 14:07 ` [U-Boot] [U-Boot,v2,1/1] " Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Jörg Krause @ 2015-04-22 19:36 UTC (permalink / raw)
To: u-boot
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>
---
Changes v1 -> v2:
- Fix header include in image.h (reported by 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 3844be6..60b924a 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 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 <errno.h>
#include <env_flags.h>
#include <fcntl.h>
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 <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 3482951..9ce7a77 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>
--
2.3.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [U-Boot,v2,1/1] Fix musl build
2015-04-22 19:36 [U-Boot] [PATCH v2 1/1] Fix musl build Jörg Krause
@ 2015-05-10 14:07 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2015-05-10 14:07 UTC (permalink / raw)
To: u-boot
On Wed, Apr 22, 2015 at 09:36:22PM +0200, J?rg Krause wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150510/35b52c73/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-10 14:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-22 19:36 [U-Boot] [PATCH v2 1/1] Fix musl build Jörg Krause
2015-05-10 14:07 ` [U-Boot] [U-Boot,v2,1/1] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox