tools: compiler.h: Fix build on FreeBSD
PATCH 1/1 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 <[email protected]>
CC Tom Rini <[email protected]>
Signed-off-by Jeroen Hofstee <[email protected]>
--- include/compiler.h | 4 ++++ 1 file changed, 4 insertions(+)
include/compiler.h +4 -0
@@ -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 ;
Signature · 1 line
2.1.0
PATCH 1/1 tools: compiler.h: Fix build on FreeBSD
Quoted 9 lines · Jeroen Hofstee
Commit 832472 "tools: socfpga: Add socfpga preloader signing to mkimage" added
tools/socfpga.cwhich relies on htole32, le32toh and friends. Whilecompiler.hincludes these protypes for linux fromendian.h, it doesn't do so for FreeBSD. Hence include <sys/endian.h> for FreeBSD.Cc Marek Vasut <[email protected]>CC Tom Rini <[email protected]>Signed-off-by Jeroen Hofstee <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141011/dc434e64/attachment.pgp>