build-failure with no IPv6 available at runtime
ametzler at downhill.at.eu.org
Sun Dec 18 15:50:54 CET 2011
----- Forwarded message from Pino Toscano <pino at debian.org> -----
Message-ID: <20111218142339.18834.96560.reportbug at localhost.localdomain>
if the current kernel (be it Linux compiled without it, or Hurd with no
inet6 translator setup) does not provide support for IPv6, two tests,
will fail. This is because gnutls-serv queries (in src/serv.c,
listen_socket()) getaddrinfo() to known all the available addresses
for the specified port, returning even those which cannot be configured
(and for which socket() will fail with EAFNOSUPPORT). At least on Hurd,
the returned list from getaddrinfo() had two elements, first the AF_INET
and then AF_INET6, and given that the return value of the last execution
of socket() returns -1, that is the return value of the whole
listen_socket(), even if the AF_INET socket has been correctly setup.
My solution is adding the AI_ADDRCONFIG flag to the hints for
getaddrinfo(), so it returns only addresses which can be configured.
(See also .) This should allow gnutls-serv to listen to both IPv4
and IPv6 if both are available in the system, or just IPv4 if IPv6
cannot be used.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 339 bytes
Desc: not available
More information about the Gnutls-devel