Skip to content
Snippets Groups Projects
Commit 26e355d1 authored by Jörg Krause's avatar Jörg Krause Committed by Tom Rini
Browse files

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: default avatarJörg Krause <joerg.krause@embedded.rocks>
Cc: Tom Rini <trini@konsulko.com>
parent 1cdd9412
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
struct lmb; struct lmb;
#ifdef USE_HOSTCC #ifdef USE_HOSTCC
#include <sys/types.h>
/* new uImage format support enabled on host */ /* new uImage format support enabled on host */
#define CONFIG_FIT 1 #define CONFIG_FIT 1
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
* SPDX-License-Identifier: GPL-2.0+ * SPDX-License-Identifier: GPL-2.0+
*/ */
#define _GNU_SOURCE
#include <errno.h> #include <errno.h>
#include <env_flags.h> #include <env_flags.h>
#include <fcntl.h> #include <fcntl.h>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h>
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#include <u-boot/sha1.h> #include <u-boot/sha1.h>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/types.h>
#include <compiler.h> #include <compiler.h>
#include <trace.h> #include <trace.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment