From b3594ab4899aebf3883694fabe469a414dd9a799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Wed, 18 Jun 2014 00:43:35 +0300 Subject: util/cbmem: Workaround for IS_ENABLED() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our include files reference CONFIG_xxx declarations, which we should ignore for utility build. We cannot include kconfig.h to get IS_ENABLED() as that file would require build/config.h and we do not want to enforce a build of the firmware to be able to build the utility. Since we do not include build/config.h each occurence of CONFIG_xxx in the included header files is undefined and will be treated as disabled. Change-Id: I74f1627fc3f294410db8ce486ab553dac9e967f4 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/6066 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- util/cbmem/cbmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c index 9ad121467d..fabede32c4 100644 --- a/util/cbmem/cbmem.c +++ b/util/cbmem/cbmem.c @@ -36,6 +36,7 @@ #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #define MAP_BYTES (1024*1024) +#define IS_ENABLED(x) (defined (x) && (x)) #include "boot/coreboot_tables.h" -- cgit v1.2.3