gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GnuTLS 2.6.6/2.7.8 assumes AF_INET6 is available


From: Simon Josefsson
Subject: Re: GnuTLS 2.6.6/2.7.8 assumes AF_INET6 is available
Date: Wed, 06 May 2009 10:01:20 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.93 (gnu/linux)

"Tom G. Christensen" <address@hidden> writes:

>> Interesting.  Does adding this to the top of serv.c work:
>> 
>> #ifndef HAVE_IPV6
>> # define sockaddr_storage sockaddr_in
>> #endif
>> 
> This causes another error:
>
> gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..  -I../includes -I../includes
> -I../lgl -I../lgl -I../gl -I../gl -I./cfg -I/usr/tgcware/include
> -I/usr/tgcware/include -g -O2 -Wno-pointer-sign -MT serv.o -MD -MP -MF
> .deps/serv.Tpo -c -o serv.o serv.c
> serv.c: In function 'get_port':
> serv.c:789: error: 'const struct sockaddr_in' has no member named
> 'ss_family'
> make[3]: *** [serv.o] Error 1

Oops, try this instead:

#ifndef HAVE_IPV6
# define sockaddr_storage sockaddr
#endif

There is another more complex work around mentioned at the end of:

http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/socket.h.html

Maybe the above won't work, and then maybe we need something like that.

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]