Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 355949 - linux/in.h in sys-kernel/linux-headers-2.6.36.1 is not patched
Summary: linux/in.h in sys-kernel/linux-headers-2.6.36.1 is not patched
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-22 02:33 UTC by Zhixu Liu
Modified: 2011-02-23 03:12 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 Zhixu Liu 2011-02-22 02:33:46 UTC
package sys-kernel/linux-headers-2.6.36.1

linux/in.h is not patched as in linux-headers-2.6.30-r1

when include both linux/in.h and netinet/in.h, following compile error shows:

/usr/include/linux/in.h:26: error: redeclaration of enumerator ‘IPPROTO_IP’
/usr/include/netinet/in.h:34: note: previous definition of ‘IPPROTO_IP’ was here
...

I checked linux-headers-2.6.30-r1, 
00_all_0008-HACK-linux-pull-in-C-library-headers.patch is not included in linux-headers-2.6.36.1

Reproducible: Always

Steps to Reproduce:
$ cat a.c 
#include <netinet/in.h>
#include <linux/in.h>
$ LANG=C gcc -c a.c
In file included from a.c:2:
/usr/include/linux/in.h:26: error: redeclaration of enumerator 'IPPROTO_IP'
/usr/include/netinet/in.h:34: note: previous definition of 'IPPROTO_IP' was here
...
Comment 1 SpanKY gentoo-dev 2011-02-22 20:45:49 UTC
dont include both
Comment 2 Zhixu Liu 2011-02-23 01:34:41 UTC
Why we won't fix this? There is a clear description for the purpose of patch in linux-headers-2.6.30-r1, so we don't care the reason there?

For me, I use one socket option IP_TRANSPARENT in my program. This option is for linux only at present, so after upgrade linux-headers to 2.6.36.1, the program failed to compile. The only solution for me is to not include linux/in.h but define the option myself, this is obviously not a portable solution. Also, I see there are several other socket options are linux specific, the program use those options will face the same problem.

Comment 3 SpanKY gentoo-dev 2011-02-23 03:12:01 UTC
take it up with lkml