diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-01-21 13:19:15 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-01-28 20:27:31 +0300 |
commit | d2bf1152c078e7db7ffade193da8cfb1b8430ce0 (patch) | |
tree | 5fd34e3e2d14a44c01eab363a7ebafaebd12fc07 /tools/fdtgrep.c | |
parent | b0bd96c858afc273b6030a4c19c5074e6163b6f8 (diff) | |
download | u-boot-d2bf1152c078e7db7ffade193da8cfb1b8430ce0.tar.xz |
tools: include necessary headers explicitly
Several host-tools use "bool" type without including <stdbool.h>.
This relies on the crappy header inclusion chain.
tools/Makefile has the following line:
HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
All host-tools are forced to include libfdt_env.h even if they are
totally unrelated to FDT. Then, <stdbool.h> is indirectly included
as follows:
include/libfdt_env.h
-> include/linux/types.h
-> <stdbool.h>
I am fixing this horrible crap. In advance, I need to add necessary
include directives explicitly. tools/fdtgrep.c needs more; <fctl.h>
for open() and <errno.h> for errno.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/fdtgrep.c')
-rw-r--r-- | tools/fdtgrep.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c index 7af77b7afe..8d33205ea2 100644 --- a/tools/fdtgrep.c +++ b/tools/fdtgrep.c @@ -10,7 +10,10 @@ #include <assert.h> #include <ctype.h> +#include <errno.h> #include <getopt.h> +#include <fcntl.h> +#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> |