1 From ad23f45b346f196e07ba49d354a12762f19abfa4 Mon Sep 17 00:00:00 2001
2 From: Masahiro Yamada <yamada.masahiro@socionext.com>
3 Date: Sun, 21 Jan 2018 19:19:15 +0900
4 Subject: [PATCH 2/2] tools: include necessary headers explicitly
6 Several host-tools use "bool" type without including <stdbool.h>.
7 This relies on the crappy header inclusion chain.
9 tools/Makefile has the following line:
11 HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
13 All host-tools are forced to include libfdt_env.h even if they are
14 totally unrelated to FDT. Then, <stdbool.h> is indirectly included
18 -> include/linux/types.h
21 I am fixing this horrible crap. In advance, I need to add necessary
22 include directives explicitly. tools/fdtgrep.c needs more; <fctl.h>
23 for open() and <errno.h> for errno.
25 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
26 Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
27 Reviewed-by: Simon Glass <sjg@chromium.org>
29 tools/fdtgrep.c | 3 +++
31 tools/imagetool.h | 1 +
32 3 files changed, 5 insertions(+)
34 diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c
35 index fbe38c824a41..13703fc3b1b9 100644
49 diff --git a/tools/ifdtool.c b/tools/ifdtool.c
50 index c805597744bd..e4c2f82c4a1e 100644
61 diff --git a/tools/imagetool.h b/tools/imagetool.h
62 index 15c2a0c0e1c1..076e5e0dc8f9 100644
63 --- a/tools/imagetool.h
64 +++ b/tools/imagetool.h
66 #include "os_support.h"