]> git.baikalelectronics.ru Git - uboot.git/commit
tools: include necessary headers explicitly
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 21 Jan 2018 10:19:15 +0000 (19:19 +0900)
committerTom Rini <trini@konsulko.com>
Sun, 28 Jan 2018 17:27:31 +0000 (12:27 -0500)
commit428cab17dd811854cb835b45a0c17e6bf9162968
tree5fd34e3e2d14a44c01eab363a7ebafaebd12fc07
parent02c2c5a4700aaae1cd2a02c06fce30a3e9ca9477
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>
tools/fdtgrep.c
tools/gen_ethaddr_crc.c
tools/ifdtool.c
tools/imagetool.h
tools/mips-relocs.c