diff options
author | Andreas Bießmann <andreas.devel@googlemail.com> | 2014-10-24 23:39:10 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2014-10-27 02:26:24 +0100 |
commit | 686ed2c2281a3168dcc62d097f044ec1bcc6404b (patch) | |
tree | 7a9a84bcd4f2ad7cb41f1daf8b32c60cfa8d45a6 /include/configs | |
parent | a22a584c1f7c3fafe58be28705d7fa85ec54571c (diff) | |
download | u-boot-imx-686ed2c2281a3168dcc62d097f044ec1bcc6404b.zip u-boot-imx-686ed2c2281a3168dcc62d097f044ec1bcc6404b.tar.gz u-boot-imx-686ed2c2281a3168dcc62d097f044ec1bcc6404b.tar.bz2 |
tools/socfpgaimage.c: fix build on darwin
socfpgaimage utilizes htole32 and friends, unfortunately these functions are
not available on darwin. Fix it by using the cpu_to_le32 and friends defined
in compiler.h as other parts in mkimage do.
This patch fixes the following error:
---8<---
HOSTCC tools/socfpgaimage.o
tools/socfpgaimage.c:77:22: warning: implicit declaration of function 'htole32' is invalid in C99 [-Wimplicit-function-declaration]
header.validation = htole32(VALIDATION_WORD);
^
tools/socfpgaimage.c:80:22: warning: implicit declaration of function 'htole16' is invalid in C99 [-Wimplicit-function-declaration]
header.length_u32 = htole16(length_bytes/4);
^
tools/socfpgaimage.c:95:6: warning: implicit declaration of function 'le32toh' is invalid in C99 [-Wimplicit-function-declaration]
if (le32toh(header.validation) != VALIDATION_WORD)
^
tools/socfpgaimage.c:97:6: warning: implicit declaration of function 'le16toh' is invalid in C99 [-Wimplicit-function-declaration]
if (le16toh(header.checksum) != hdr_checksum(&header))
^
4 warnings generated.
...
HOSTLD tools/dumpimage
Undefined symbols for architecture x86_64:
"_htole16", referenced from:
_socfpgaimage_set_header in socfpgaimage.o
"_htole32", referenced from:
_socfpgaimage_set_header in socfpgaimage.o
"_le16toh", referenced from:
_verify_buffer in socfpgaimage.o
"_le32toh", referenced from:
_verify_buffer in socfpgaimage.o
ld: symbol(s) not found for architecture x86_64
--->8---
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Pavel Machek <pavel@denx.de>
Diffstat (limited to 'include/configs')
0 files changed, 0 insertions, 0 deletions