[U-Boot] [PATCH 2/3] common: env_flags: include common.h even for HOST_CC

Peter Robinson pbrobinson at gmail.com
Wed Feb 3 13:42:51 CET 2016


When compiling with gcc 6 we get the following error due to ARRAY_SIZE being
defined elsewhere.

common/env_flags.c:155: undefined reference to `ARRAY_SIZE'

Signed-off-by: Peter Robinson <pbrobinson at gmail.com>
---
 common/env_flags.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/env_flags.c b/common/env_flags.c
index 9c3aed1..696adef 100644
--- a/common/env_flags.c
+++ b/common/env_flags.c
@@ -7,6 +7,7 @@
 
 #include <linux/string.h>
 #include <linux/ctype.h>
+#include <common.h>
 
 #ifdef USE_HOSTCC /* Eliminate "ANSI does not permit..." warnings */
 #include <stdint.h>
@@ -16,7 +17,6 @@
 #include <env_flags.h>
 #define getenv fw_getenv
 #else
-#include <common.h>
 #include <environment.h>
 #endif
 
-- 
2.5.0



More information about the U-Boot mailing list