[U-Boot] [PATCH 3/7] tools: include necessary headers explicitly

Simon Glass sjg at chromium.org
Tue Jan 16 14:50:45 UTC 2018


On 9 January 2018 at 01:34, Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:
> 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 at socionext.com>
> ---
>
>  tools/fdtgrep.c         | 3 +++
>  tools/gen_ethaddr_crc.c | 1 +
>  tools/ifdtool.c         | 1 +
>  tools/imagetool.h       | 1 +
>  tools/mips-relocs.c     | 1 +
>  5 files changed, 7 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list