summaryrefslogtreecommitdiffstats
path: root/src/include/elog.h
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-04-15 14:32:53 +1000
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2014-04-20 17:43:34 +0200
commit5c97142419a7b7204786fea5b785c23a3bb41836 (patch)
tree0c77638f91b5a7b75b0860e47bef1ecc5143fe62 /src/include/elog.h
parent3bc6eb544ccfcd2f338652ca109442a8b8a01161 (diff)
downloadcoreboot-5c97142419a7b7204786fea5b785c23a3bb41836.tar.gz
coreboot-5c97142419a7b7204786fea5b785c23a3bb41836.tar.bz2
coreboot-5c97142419a7b7204786fea5b785c23a3bb41836.zip
drivers/elog: Fix implicit function declaration issue
Fix compilation. Relying on the pre-processor to condition an if statement will lead to warnings of implicitly defined functions. To solve this dilemma add symbols to resolve to at compile time. Change-Id: Id0117528c5579cc1dec750a8a17a76fab4314b3f Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/5504 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/include/elog.h')
-rw-r--r--src/include/elog.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/elog.h b/src/include/elog.h
index f9b5d53941a4..eb8352dd3cb7 100644
--- a/src/include/elog.h
+++ b/src/include/elog.h
@@ -162,7 +162,9 @@ extern u32 gsmi_exec(u8 command, u32 *param);
#if CONFIG_ELOG_BOOT_COUNT
u32 boot_count_read(void);
u32 boot_count_increment(void);
-#endif
+#else
+static inline u32 boot_count_read(void) { return 0; }
+#endif /* CONFIG_ELOG_BOOT_COUNT */
#endif /* !CONFIG_ELOG */