Bug 1261 - The getline() in output/build/linux-2.6.28/scripts/unifdef.c in buildroot is buggy
Summary: The getline() in output/build/linux-2.6.28/scripts/unifdef.c in buildroot is ...
Status: RESOLVED WONTFIX
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Other Linux
: P3 enhancement
Target Milestone: ---
Assignee: unassigned
URL:
Keywords: link-failure
Depends on:
Blocks:
 
Reported: 2010-03-11 05:47 UTC by Vikas Krishna Managutte
Modified: 2010-07-18 17:00 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vikas Krishna Managutte 2010-03-11 05:47:26 UTC
Hi,

Yesterday i was trying to buildroot for my ARM920t and i think this is the bug.

Target: ARM920t
OS: Fedora 12 ( 2.6.31 using)
Kernel Headers: 2.6.32
Kernel used: 2.6.28

output/build/linux-2.6.28/scripts/unifdef.c

the getline() function in unidef.c contradicts with the already present getline function in stdio.h and gives this error

error:
/usr/include/stdio.h:653: note: previous declaration of ‘getline’ was here

How i fixed the error?

i changed the getline function in unidef.c to get_line ie. other than getline and it works fine.
Comment 1 Peter Korsgaard 2010-03-14 07:26:13 UTC
(In reply to comment #0)

> /usr/include/stdio.h:653: note: previous declaration of ‘getline’ was here
> 
> How i fixed the error?
> 
> i changed the getline function in unidef.c to get_line ie. other than getline
> and it works fine.

That's a known problem in older versions of the Linux kernel when building on new distributions. The official fix (which is included in 2.6.29+) is like you describe (getline -> get_line).

Any reason why you want to use such an old kernel for a new project?

Comment 2 Thomas Petazzoni 2010-07-18 17:00:39 UTC
This is not a Buildroot bug, but rather a know bug when using old versions of the kernel in newer distributions. I don't think there's anything Buildroot can do to fix this.