Commit ed8271d11c5c7a31eb49f787fa25eece6b82bb9e

Authored by Jeroen Hofstee
Committed by Tom Rini
1 parent 4a74298c54

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>

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

... ... @@ -48,6 +48,10 @@
48 48 # include <machine/endian.h>
49 49 typedef unsigned long ulong;
50 50 #endif
  51 +#ifdef __FreeBSD__
  52 +# include <sys/endian.h> /* htole32 and friends */
  53 +#endif
  54 +
51 55 #include <time.h>
52 56  
53 57 typedef uint8_t __u8;