Skip to contentSkip to conversation

Fix compiler warning in imximage.c due to getline prototype

PATCH New Kumar Gala 2 participants 2 messages Jan 27, 2010 Arm i.MX and Layerscape

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH v2 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'

---
* Moved _GNU_SOURCE define into imximage.c per Mike F. suggestion

 tools/imximage.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
tools/imximage.c +3 -0
index c1fdafb..59923ff 100644
@@ -25,6 +25,9 @@
  * MA 02111-1307 USA
  */
 
+/* Required to obtain the getline prototype from stdio.h */
+#define _GNU_SOURCE
+
 #include "mkimage.h"
 #include <image.h>
 #include "imximage.h"
Signature · 1 line
1.6.0.6
#1 lore raw

PATCH v2 1/1 Fix compiler warning in imximage.c due to getline prototype

Dear Kumar Gala,

Quoted 9 lines · In message <[email protected]> you…

imximage.c: In function 'imximage_parse_cfg_file':
imximage.c:142: warning: implicit declaration of function 'getline'

---
* Moved _GNU_SOURCE define into imximage.c per Mike F. suggestion

 tools/imximage.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 8 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The universe contains any amount of horrible ways  to  be  woken  up,
such as the noise of the mob breaking down the front door, the scream
of fire engines, or the realization that today is the Monday which on
Friday night was a comfortably long way off.
                                 - Terry Pratchett, _Moving Pictures_