Fix compiler warning in imximage.c due to getline prototype
PATCH 1/1 Fix compiler warning in imximage.c due to getline prototype
imximage.c: In function 'imximage_parse_cfg_file':
imximage.c:142: warning: implicit declaration of function 'getline'
---
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(-)
tools/os_support.h +7 -0
@@ -19,6 +19,13 @@#ifndef __OS_SUPPORT_H_#define __OS_SUPPORT_H_ +/* +* We need _GNU_SOURCE defined before #include <stdio.h> for getline prototype +*/ +#if defined(__linux__) +#define _GNU_SOURCE +#endif +#include "compiler.h" /*
Signature · 1 line
1.6.0.6
PATCH 1/1 Fix compiler warning in imximage.c due to getline prototype
Quoted 17 lines · 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 <[email protected]>---
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(-)tools/os_support.h +0
-0
tools/os_support.h line 27
Quoted 9 lines
tools/os_support.h +5
-0@@ -19,6 +19,13 @@#ifndef __OS_SUPPORT_H_#define __OS_SUPPORT_H_ +/* +* We need _GNU_SOURCE defined before #include <stdio.h> 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