]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Fix musl build
authorJörg Krause <joerg.krause@embedded.rocks>
Wed, 22 Apr 2015 19:36:22 +0000 (21:36 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:38:41 +0000 (22:38 +0200)
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>
include/image.h
tools/env/fw_env.c
tools/imagetool.h
tools/proftool.c

index 3844be67d8e014d9c80b6a0ce12cd2fe70faac1d..60b924a5b6feb43a78a16781699547a8d5485247 100644 (file)
@@ -23,6 +23,7 @@
 struct lmb;
 
 #ifdef USE_HOSTCC
+#include <sys/types.h>
 
 /* new uImage format support enabled on host */
 #define CONFIG_FIT             1
index 1173eea78206dca66942380f49df22aa5004ae48..daa02a760e3744b252269113f1784671ed2fb03f 100644 (file)
@@ -8,6 +8,8 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <env_flags.h>
 #include <fcntl.h>
index 3e15b4e22b9a0086c57d3bb6c61a2abe35838a31..b7874f47cd228f0a6aaf93f9098979f36a7ca5ca 100644 (file)
@@ -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>
index 348295198cd3d061dd8fc83baa10a6040f25e338..9ce7a7796e7f04b310eae4dc713d6c6a613e0acb 100644 (file)
@@ -16,6 +16,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <sys/param.h>
+#include <sys/types.h>
 
 #include <compiler.h>
 #include <trace.h>