]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: compiler.h: Fix build on FreeBSD
authorJeroen Hofstee <jeroen@myspectrum.nl>
Tue, 7 Oct 2014 20:42:27 +0000 (22:42 +0200)
committerTom Rini <trini@ti.com>
Fri, 10 Oct 2014 20:00:01 +0000 (16:00 -0400)
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>
include/compiler.h

index 14519163a32bfa13d2df16a22d66735b28b52138..21036022d7a12c68916599c487e68f3ff2ea83d6 100644 (file)
 # 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;