summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeroen Hofstee <jeroen@myspectrum.nl>2014-10-07 22:42:27 +0200
committerTom Rini <trini@ti.com>2014-10-10 16:00:01 -0400
commited8271d11c5c7a31eb49f787fa25eece6b82bb9e (patch)
tree82c2f16d244eb0ed53842b7901fb1c370a3432ed /include
parent4a74298c54272f1b0397826072c193158d3e7f14 (diff)
downloadu-boot-imx-ed8271d11c5c7a31eb49f787fa25eece6b82bb9e.zip
u-boot-imx-ed8271d11c5c7a31eb49f787fa25eece6b82bb9e.tar.gz
u-boot-imx-ed8271d11c5c7a31eb49f787fa25eece6b82bb9e.tar.bz2
tools: compiler.h: Fix build on FreeBSD
Commit 832472 "tools: socfpga: Add socfpga preloader signing to mkimage" added tools/socfpga.c which relies on htole32, le32toh and friends. While compiler.h includes these protypes for linux from endian.h, it doesn't do so for FreeBSD. Hence include <sys/endian.h> for FreeBSD. Cc: Marek Vasut <marex@denx.de> CC: Tom Rini <trini@ti.com> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Diffstat (limited to 'include')
-rw-r--r--include/compiler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/compiler.h b/include/compiler.h
index 1451916..2103602 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -48,6 +48,10 @@
# include <machine/endian.h>
typedef unsigned long ulong;
#endif
+#ifdef __FreeBSD__
+# include <sys/endian.h> /* htole32 and friends */
+#endif
+
#include <time.h>
typedef uint8_t __u8;