diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2020-09-23 11:08:49 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-29 20:55:43 +0000 |
commit | ffb3d8111820142bf8314a419230e2e3f7baf5d0 (patch) | |
tree | d8747fe4c5684bb6aa7af163623750aa9884494a | |
parent | d4be394be0b91a71b2f16ca476114b7470bc630f (diff) | |
download | chrome-ec-ffb3d8111820142bf8314a419230e2e3f7baf5d0.tar.gz |
common: include config.h from console.h
console.h currently relies on many config options to selectively
define macros. It does not currently include config.h, which means
these config options are not guaranteed to be defined by this point.
We will need this for Zephyr as well.
There were a few configuration header files which implicitly relied on
the ording of including console.h to bring in stdint.h at some point.
We explicitly include what we use here to fix that.
BUG=b:167590251
BRANCH=none
TEST=build passes
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ia005577a2579962ee8b14c61930f37fe28bc8f5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427088
Reviewed-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r-- | board/twinkie/board.h | 2 | ||||
-rw-r--r-- | include/console.h | 1 | ||||
-rw-r--r-- | test/test_config.h | 4 |
3 files changed, 7 insertions, 0 deletions
diff --git a/board/twinkie/board.h b/board/twinkie/board.h index 24b5b996bf..b5756fda34 100644 --- a/board/twinkie/board.h +++ b/board/twinkie/board.h @@ -64,6 +64,8 @@ #ifndef __ASSEMBLER__ +#include <stdint.h> + void sniffer_init(void); int wait_packet(int pol, uint32_t min_edges, uint32_t timeout_us); diff --git a/include/console.h b/include/console.h index df0762c8e3..178309812c 100644 --- a/include/console.h +++ b/include/console.h @@ -9,6 +9,7 @@ #define __CROS_EC_CONSOLE_H #include "common.h" +#include "config.h" /* * The EC code base has been using %h to print a hex buffer. Encode the diff --git a/test/test_config.h b/test/test_config.h index f4047701ad..0d473eadad 100644 --- a/test/test_config.h +++ b/test/test_config.h @@ -11,6 +11,10 @@ /* Test config flags only apply for test builds */ #ifdef TEST_BUILD +#ifndef __ASSEMBLER__ +#include <stdint.h> +#endif + /* Host commands are sorted. */ #define CONFIG_HOSTCMD_SECTION_SORTED |