Skip to contentSkip to conversation

Compilation failure on MIPS with 2.6.9.1 kernel headers

buildroot Thomas Petazzoni 2 participants 2 messages Oct 26, 2004 – Oct 27, 2004 MIPS

lore
Share & tools
lore
#0 lore raw

Hello,

The compilation fails on MIPS with the new 2.6.9.1 kernel headers :

================================================================
In file included from ../../../include/bits/socket.h:305,

                 from ../../../include/netinet/in.h:212,
                 from ../../../include/netdb.h:28,
                 from __h_errno_location.c:3:

../../../include/asm/socket.h:86: error: conflicting types for 'SOCK_DGRAM' ../../../include/bits/socket.h:43: error: previous definition of 'SOCK_DGRAM' was here ../../../include/asm/socket.h:87: error: conflicting types for 'SOCK_STREAM' ../../../include/bits/socket.h:46: error: previous definition of 'SOCK_STREAM' was here ../../../include/asm/socket.h:88: error: conflicting types for 'SOCK_RAW' ../../../include/bits/socket.h:49: error: previous definition of 'SOCK_RAW' was here ../../../include/asm/socket.h:89: error: conflicting types for 'SOCK_RDM' ../../../include/bits/socket.h:51: error: previous definition of 'SOCK_RDM' was here ../../../include/asm/socket.h:90: error: conflicting types for 'SOCK_SEQPACKET' ../../../include/bits/socket.h:53: error: previous definition of 'SOCK_SEQPACKET' was here ../../../include/asm/socket.h:91: error: conflicting types for 'SOCK_PACKET' ../../../include/bits/socket.h:60: error: previous definition of 'SOCK_PACKET' was here
================================================================

I think this issue has been discussed (and fixed) in the Linux MIPS CVS, see :
http://www.linux-mips.org/archives/linux-mips/2004-10/msg00286.html
http://www.linux-mips.org/archives/linux-cvs/2004-10/msg00120.html

As I understand it, #ifdef __KERNEL__ conditionnal is missing, leading to SOCK_* being visible to the userspace, and conflicting with libc definitions.

Thomas

Signature · 4 lines
PETAZZONI Thomas - [email protected]
http://thomas.enix.org - Jabber: [email protected]
KOS: http://kos.enix.org/ - Lolut: http://lolut.utbm.info
Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E  1624 F653 CB30 98D3 F7A7
#1 lore raw
Quoted 3 lines · Thomas Petazzoni

As I understand it, #ifdef __KERNEL__ conditionnal is missing, leading to SOCK_* being visible to the userspace, and conflicting with libc definitions.

In general the policy is to avoid the use of kernel headers in userspace but glibc is one of those exceptions which we still tollerate ...

Ralf