From: Lubomir Rintel Date: Sun, 14 Feb 2016 19:13:24 +0000 (+0100) Subject: tools: fix env_flags build X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=ed0f40a673c42b4174ccb34e3c6d7b46cd90b701;p=u-boot.git tools: fix env_flags build $ make tools-all ... In file included from tools/env/env_flags.c:1:0: tools/env/../../common/env_flags.c: In function ‘env_flags_parse_varaccess_from_binflags’: tools/env/../../common/env_flags.c:156:18: warning: implicit declaration of function ‘ARRAY_SIZE’ [-Wimplicit-function-declaration] for (i = 0; i < ARRAY_SIZE(env_flags_varaccess_mask); i++) ^ Seems like the other utilities just add a copy of ARRAY_SIZE since there's nowhere to include it from (tools/imagetool.h, tools/mxsimage.h). Let's do the same here. Signed-off-by: Lubomir Rintel --- diff --git a/common/env_flags.c b/common/env_flags.c index 735bba5f8b..921d3770ea 100644 --- a/common/env_flags.c +++ b/common/env_flags.c @@ -15,6 +15,7 @@ #include #include #define getenv fw_getenv +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #else #include #include