From patchwork Sun Jan 21 10:19:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 125272 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp632911ljf; Sun, 21 Jan 2018 02:25:17 -0800 (PST) X-Google-Smtp-Source: AH8x224bnI4FIXHgmSwnYKy6bSBGddaWLjFymW07NGeTXfLz5+0XyzXAUFj0DmpeE5bR2sz4dbNE X-Received: by 10.80.135.205 with SMTP id 13mr8237105edz.253.1516530317478; Sun, 21 Jan 2018 02:25:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516530317; cv=none; d=google.com; s=arc-20160816; b=t7FF3zUEAALX10TrKkcTlWVxYfWNLeMtWBxRvngrxQLf9G9esBZwxvB04aRr7M+jLl lTTi0nMjNitfHXknfwIK/X1DMrvwAqKAEKmrW1I4nbcntZCvBK6lFj7lhAhSyv9Xvr8c lRuTVX7TOKIut2HBe2BBGsk1fDUcs3dBnu/PuVZarXaDE3/mEv2z2cMYiQ/tDIISwAnh NRVhKsH7vbI5gNBrWR2/XUH3v0v0oO/VnEsB+VGTp7uXcFAL2r10fYA0iJpjgYz+KL2k GDLyC57nPUsZRgS+RZkEfX1e7R/CFs+iQ324RlhE4rQX35/fpI5RVsexbkfMz//43E8w lRag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=OnQVWntoAQP3XkxCmd23Vhy0JI4hXF8dUSV7c/C+rcQ=; b=uHFtpfs13IJH4zH2Kfm4KgnD5k0CBHMIyXAuesUzMDtEf39n16x7RbA+EdtekushRr YA8pnFeIJAQ1nuTvsWF3ey2bbdyhtpqkdbvgPClaE0LPQSmuKM5ACW9/6Gctn+W5vTXA GsNEldljLg7VcNDkx4gj4fURb+yd0R6vzykq63vrK/Rmw0zax+GYwpwv0zpblJJ+AiFt rX4nrxhKdV2++LHxNI2hhQnuknvj04rGwpDZS/9CpKL3whB/lWXM11gkTxyDXC87nbQv L/kGgQHXhN4SzfGt9S5voWe3yWyQI+OkUrlLuGIiA0lFRo0+xF2RVGdE+koHA1GGBjH3 EtKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=CW5a7oSs; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id q12si2982971edh.510.2018.01.21.02.25.17; Sun, 21 Jan 2018 02:25:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=CW5a7oSs; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 130B0C21F6D; Sun, 21 Jan 2018 10:24:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C8BF2C22003; Sun, 21 Jan 2018 10:20:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C124AC2202D; Sun, 21 Jan 2018 10:20:34 +0000 (UTC) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by lists.denx.de (Postfix) with ESMTPS id B9DEBC21FB1 for ; Sun, 21 Jan 2018 10:20:29 +0000 (UTC) Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-08.nifty.com with ESMTP id w0LAJUZg005764; Sun, 21 Jan 2018 19:19:32 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w0LAJUZg005764 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1516529972; bh=/W25+tBmiU9d/2UzgfjmTgvw3HJZUAXnAbNsoZLJ74Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CW5a7oSsXOuBk2Hz7VPZbAOlIbZUHRbJn35D9BApPxDVUqGl9uOkmElrQ66GxXvLm BPPk4I8IEXoQtTtNXVCBnHZFC9F93zWSVmPNY2K52DVOeyZ8TQ1VwboHmUfRsyf4+i DQd1TkRSBe8gyJNQ6wmGLEVo/Ez0sDrp570/Hr3gjgdAMFcYHrLgkeopbBxiS4UYZM Xk+JzzyNrT9HcZbmE2DMHuUYZqWECI8LYq6nMr8KYQJAKKCh/ACCDvyUK12OgyOPxD 86qFnXNx3EXBjhgrxEHmN+0Zb0AK2Y9AYnldpaHu2LDvRnaqRLJ0HYFUFOCKFbznbU w5ZCXChYM1MMQ== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Sun, 21 Jan 2018 19:19:15 +0900 Message-Id: <1516529958-16441-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516529958-16441-1-git-send-email-yamada.masahiro@socionext.com> References: <1516529958-16441-1-git-send-email-yamada.masahiro@socionext.com> Cc: Joe Hershberger , "oliver@schinagl.nl" , Olliver Schinagl Subject: [U-Boot] [PATCH v3 3/6] tools: include necessary headers explicitly X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Several host-tools use "bool" type without including . 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, is indirectly included as follows: include/libfdt_env.h -> include/linux/types.h -> I am fixing this horrible crap. In advance, I need to add necessary include directives explicitly. tools/fdtgrep.c needs more; for open() and for errno. Signed-off-by: Masahiro Yamada Reviewed-by: Joe Hershberger Reviewed-by: Simon Glass --- Changes in v3: None 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(+) diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c index 7af77b7..8d33205 100644 --- a/tools/fdtgrep.c +++ b/tools/fdtgrep.c @@ -10,7 +10,10 @@ #include #include +#include #include +#include +#include #include #include #include diff --git a/tools/gen_ethaddr_crc.c b/tools/gen_ethaddr_crc.c index fe9896d..8cf86f4 100644 --- a/tools/gen_ethaddr_crc.c +++ b/tools/gen_ethaddr_crc.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/tools/ifdtool.c b/tools/ifdtool.c index 195b153..729991e 100644 --- a/tools/ifdtool.c +++ b/tools/ifdtool.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/imagetool.h b/tools/imagetool.h index a8d5054..e67de9b 100644 --- a/tools/imagetool.h +++ b/tools/imagetool.h @@ -12,6 +12,7 @@ #include "os_support.h" #include #include +#include #include #include #include diff --git a/tools/mips-relocs.c b/tools/mips-relocs.c index 8be69d3..27d4730 100644 --- a/tools/mips-relocs.c +++ b/tools/mips-relocs.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include