Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 236282 - /lib/modules/2.6.26-gentoo-r1/build/include/linux/netfilter/st_sctp.h is written in C++
Summary: /lib/modules/2.6.26-gentoo-r1/build/include/linux/netfilter/st_sctp.h is writ...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-31 19:06 UTC by falcon
Modified: 2008-10-07 19:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description falcon 2008-08-31 19:06:37 UTC
/lib/modules/2.6.26-gentoo-r1/build/include/linux/netfilter/st_sctp.h includes the C++ keyword bool on lines 67 and 79, the keyword true on lines 74 and 86, and the keyword false on lines 73 and 85.  This makes it impossible to build stuff written in C against it using gcc 4.3.1-r1 (i686-pc-linux-gnu), which is correct behaviour because those things are not defined in C.  Specifically, no version of iptables in portage can build against that.

I actually have no idea what installs this file exactly (equery belongs shows nothing on my system), but it's most probably part of the kernel.

Reproducible: Always

Steps to Reproduce:
1. Build a gentoo system with kernel 2.6.26-gentoo-r1
2. Try to merge iptables

Actual Results:  
It cannot compile, complaining of a syntax error (it expected a keyword)

Expected Results:  
It should compile successfully.

I solved this temporarily on my system by replacing bool with char and adding these lines near the top of the file:

#define true 1
#define false 0

That might make C++ apps unable to use the headers, though.
Comment 1 Mike Pagano gentoo-dev 2008-10-07 19:37:57 UTC
If you figure out what installs this file, we can look more into this. I was unable to locate the source.