GnuTLS 2.6.6/2.7.8 assumes AF_INET6 is available

Simon Josefsson simon at josefsson.org
Tue May 5 17:29:52 CEST 2009


"Tom G. Christensen" <tgc at jupiterrise.com> writes:

> On Tue, May 05, 2009 at 12:01:00PM +0200, Simon Josefsson wrote:
>> "Tom G. Christensen" <tgc at jupiterrise.com> writes:
>> 
>> > I just attempted a build of GnuTLS 2.6.6 on Solaris 2.6 but it fails
>> > in src/serv.c because AF_INET6 is undefined.
>> >
> <snip>
>> Thanks for the report.  For 2.6.6, can you try the patch below?  If it
>> works, we can port it to GnuTLS 2.7.x as well.
>> 
> It works fine but it fails in src/serv.c on a related error in that
> Solaris 2.6 does not define sockaddr_storage.
>
> 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:783: warning: 'struct sockaddr_storage' declared inside parameter list
> serv.c:783: warning: its scope is only this definition or declaration, which is probably not what you want
> serv.c: In function 'get_port':
> serv.c:785: error: dereferencing pointer to incomplete type
> serv.c: In function 'main':
> serv.c:815: error: storage size of 'client_address' isn't known
> make[3]: *** [serv.o] Error 1

Interesting.  Does adding this to the top of serv.c work:

#ifndef HAVE_IPV6
# define sockaddr_storage sockaddr_in
#endif

/Simon





More information about the Gnutls-devel mailing list