[klibc] [PATCH 13/16] Define types and values in sys/socket.h

Mike Waychison mikew at google.com
Tue Mar 16 09:18:06 PDT 2010


On 3/16/2010 4:29 AM, Louis Rilling wrote:
> On 01/03/10 23:46 -0800, Mike Waychison wrote:
>> It seems a lot of #defines and types in linux/socket.h are now hidden behind
>> __KERNEL__.  Include them in sys/socket.h for the time being.
>>
>> At the same time, pull in asm/socket.h and linux/uio.h as they aren't
>> implicitly pulled in anymore.
>
> Unfortunately this prevents from building klibc with earlier kernels (e.g.
> 2.6.26 on debian Lenny).
>
> What's the status of supporting earlier kernels?

Sorry, I haven't tested with older kernels.  I did expect older kernels 
to break, but I didn't see any tests for kernel version in #ifdef 
blocks, so I figured that klibc wasn't trying to track older kernels.

>
>    gcc -Wp,-MD,usr/klibc/inet/.inet_ntoa.o.d  -nostdinc -iwithprefix include -I/home/louis/klibc.git/usr/include/arch/x86_64 -Iusr/include/arch/x86_64 -I/home/louis/klibc.git/usr/include/bits64 -Iusr/include/bits64 -I/home/louis/klibc.git/usr/klibc/../include -Iusr/klibc/../include -I/home/louis/klibc.git/usr/include -Iusr/include -I/home/louis/klibc.git/linux/include -Ilinux/include -I/home/louis/klibc.git/linux/arch/x86/include -Ilinux/arch/x86/include -D__KLIBC__=1 -D__KLIBC_MINOR__=5 -D_BITSIZE=64 -fno-stack-protector -m64 -Os -fno-asynchronous-unwind-tables -fomit-frame-pointer -falign-functions=1 -falign-jumps=1 -falign-loops=1 -W -Wall -Wno-sign-compare -Wno-unused-parameter -c -o usr/klibc/inet/inet_ntoa.o usr/klibc/inet/inet_ntoa.c
> In file included from /home/louis/klibc.git/usr/klibc/../include/netinet/in.h:12,
>                   from /home/louis/klibc.git/usr/klibc/../include/arpa/inet.h:12,
>                   from usr/klibc/inet/inet_ntoa.c:7:
> /home/louis/klibc.git/usr/klibc/../include/sys/socket.h:146: error: redefinition of typedef ?sa_family_t?
> /home/louis/klibc.git/linux/include/linux/socket.h:31: error: previous declaration of ?sa_family_t? was here
> /home/louis/klibc.git/usr/klibc/../include/sys/socket.h:147: error: redefinition of ?struct sockaddr?
> /home/louis/klibc.git/usr/klibc/../include/sys/socket.h:152: error: redefinition of ?struct msghdr?
> make[4]: *** [usr/klibc/inet/inet_ntoa.o] Erreur 1
> make[3]: *** [all] Erreur 2
> make[2]: *** [klibc] Erreur 2
> make[2]: quittant le répertoire « /home/louis/klibc.git »
> make[1]: *** [override_dh_auto_build] Erreur 2
> make[1]: quittant le répertoire « /home/louis/klibc.git »
> make: *** [build] Erreur 2
>
> Thanks,
>
> Louis



More information about the klibc mailing list