From 1eec4956b7e19d5180f0c00fde0ad6c88753d7c2 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sat, 9 Oct 2021 11:09:24 -0400 Subject: image.c: Fix build warning on macOS 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 and tool builds get "lz4.h" to specify local rather than system includes. Signed-off-by: Tom Rini --- common/image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 #include #include +#include #include #include @@ -44,6 +45,7 @@ DECLARE_GLOBAL_DATA_PTR; #endif #else /* USE_HOSTCC */ +#include "lz4.h" #include "mkimage.h" #include #include @@ -61,7 +63,6 @@ DECLARE_GLOBAL_DATA_PTR; #include #include #include -#include #include #include #include -- cgit v1.1