From: Mike Frysinger Date: Wed, 27 Jan 2010 01:34:50 -0500 Subject: [U-Boot] [PATCH] Fix compiler warning in imximage.c due to getline prototype In-Reply-To: <1264569405-25893-1-git-send-email-galak@kernel.crashing.org> References: <1264569405-25893-1-git-send-email-galak@kernel.crashing.org> Message-ID: <201001270134.52224.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 27 January 2010 00:16:45 Kumar Gala wrote: > imximage.c: In function 'imximage_parse_cfg_file': > imximage.c:142: warning: implicit declaration of function 'getline' > > Signed-off-by: Kumar Gala > --- > Not sure if this is how we want to fix this or not. > > - k > > tools/os_support.h | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/tools/os_support.h b/tools/os_support.h > index 7dcbee4..4a63351 100644 > --- a/tools/os_support.h > +++ b/tools/os_support.h > @@ -19,6 +19,13 @@ > #ifndef __OS_SUPPORT_H_ > #define __OS_SUPPORT_H_ > > +/* > + * We need _GNU_SOURCE defined before #include for getline > prototype + */ > +#if defined(__linux__) > +#define _GNU_SOURCE > +#endif the linux check is unnecessary, and this should be in the imximage.c file. do it like the other weird image file. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20100127/6de84824/attachment.pgp