aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-10-09 11:09:24 -0400
committerTom Rini <trini@konsulko.com>2021-10-09 11:09:24 -0400
commit1eec4956b7e19d5180f0c00fde0ad6c88753d7c2 (patch)
tree31e0d35086b2cb720fbcbee50a9375d1a25016c4
parent94e922c76a0e1fcdead3359e340f53fd0709a963 (diff)
downloadu-boot-TEST/lz4-warning-fix.zip
u-boot-TEST/lz4-warning-fix.tar.gz
u-boot-TEST/lz4-warning-fix.tar.bz2
image.c: Fix build warning on macOSTEST/lz4-warning-fix
When building tools on macOS today we see: In file included from tools/common/image.c:1: ./tools/../common/image.c:501:10: error: implicit declaration of function 'ulz4fn' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ret = ulz4fn(image_buf, image_len, load_buf, &size); ^ as we get the system lz4.h rather than our own. Rework our include list so that target builds get <lz4.h> and tool builds get "lz4.h" to specify local rather than system includes. Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--common/image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/image.c b/common/image.c
index 5b77113..4801b18 100644
--- a/common/image.c
+++ b/common/image.c
@@ -11,6 +11,7 @@
#include <env.h>
#include <lmb.h>
#include <log.h>
+#include <lz4.h>
#include <malloc.h>
#include <u-boot/crc.h>
@@ -44,6 +45,7 @@ DECLARE_GLOBAL_DATA_PTR;
#endif
#else /* USE_HOSTCC */
+#include "lz4.h"
#include "mkimage.h"
#include <u-boot/md5.h>
#include <time.h>
@@ -61,7 +63,6 @@ DECLARE_GLOBAL_DATA_PTR;
#include <display_options.h>
#include <gzip.h>
#include <image.h>
-#include <lz4.h>
#include <imximage.h>
#include <relocate.h>
#include <linux/lzo.h>