From b106961c2e4e7f339485a401ebb06c936fc432ee Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 14 Dec 2023 07:16:54 -0500 Subject: global: Restrict use of '#include ' In general terms, we -include include/linux/kconfig.h and so normal U-Boot code does not need to also #include it. However, for code which is shared with userspace we may need to add it so that either our full config is available or so that macros such as CONFIG_IS_ENABLED() can be evaluated. In this case make sure that we guard these includes with a test for USE_HOSTCC so that it clear as to why we're doing this. Reviewed-by: Simon Glass Signed-off-by: Tom Rini --- env/embedded.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'env/embedded.c') diff --git a/env/embedded.c b/env/embedded.c index 7cbe54c56e0..5b488ef818e 100644 --- a/env/embedded.c +++ b/env/embedded.c @@ -4,7 +4,9 @@ * Erik Theisen, Wave 7 Optics, etheisen@mindspring.com. */ +#ifdef USE_HOSTCC #include +#endif #ifndef __ASSEMBLY__ #define __ASSEMBLY__ /* Dirty trick to get only #defines */ -- cgit v1.2.3