From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Grinberg Date: Mon, 05 Dec 2011 12:48:12 +0200 Subject: [U-Boot] [PATCH] tools/envcrc: fix compile breakage In-Reply-To: <1322467058-30532-1-git-send-email-grinberg@compulab.co.il> References: <201111251612.34081.vapier@gentoo.org> <1322467058-30532-1-git-send-email-grinberg@compulab.co.il> Message-ID: <4EDCA16C.1080202@compulab.co.il> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de ping! This fixes a compile breakage and IMO should be applied before 2011.12 is out. Can someone, please apply it? On 11/28/11 09:57, Igor Grinberg wrote: > When ENV_IS_EMBEDDED is not set, but CONFIG_BUILD_ENVCRC is set, > the environment.h file does not get included resulting in unrecognized > env_t type. > Fix this by moving the include directive. > > Reported-by: Mike Frysinger > Signed-off-by: Igor Grinberg > --- > tools/envcrc.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tools/envcrc.c b/tools/envcrc.c > index 111d9f6..51e3f54 100644 > --- a/tools/envcrc.c > +++ b/tools/envcrc.c > @@ -61,7 +61,6 @@ > #endif /* CONFIG_ENV_IS_IN_FLASH */ > > #if defined(ENV_IS_EMBEDDED) && !defined(CONFIG_BUILD_ENVCRC) > -# include > # define CONFIG_BUILD_ENVCRC 1 > #endif > > @@ -74,13 +73,14 @@ > #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE) > > > -extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int); > - > #ifdef CONFIG_BUILD_ENVCRC > +# include > extern unsigned int env_size; > extern env_t environment; > #endif /* CONFIG_BUILD_ENVCRC */ > > +extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int); > + > int main (int argc, char **argv) > { > #ifdef CONFIG_BUILD_ENVCRC -- Regards, Igor.