Reported by "Tom G. Christensen" <tgc@jupiterrise.com> in
<http://permalink.gmane.org/gmane.comp.encryption.gpg.gnutls.devel/3524>.
<arfrever.fta@gmail.com> in
<http://permalink.gmane.org/gmane.comp.encryption.gpg.gnutls.devel/3522>.
+** Fix build failure on systems without AF_INET6, e.g., Solaris 2.6.
+Reported by "Tom G. Christensen" <tgc@jupiterrise.com> in
+<http://permalink.gmane.org/gmane.comp.encryption.gpg.gnutls.devel/3524>.
+
** doc: Fix tables of error codes and supported algorithms.
** API and ABI modifications:
int len = strlen (str);
int ret;
+#if HAVE_IPV6
if (strchr (str, ':') != NULL || len > 16)
{ /* IPv6 */
ret = inet_pton (AF_INET6, str, ip);
return 16;
}
else
+#endif
{ /* IPv4 */
ret = inet_pton (AF_INET, str, ip);
if (ret <= 0)
{
switch (addr->ss_family)
{
+#if HAVE_IPV6
case AF_INET6:
return ntohs (((const struct sockaddr_in6 *) addr)->sin6_port);
+#endif
case AF_INET:
return ntohs (((const struct sockaddr_in *) addr)->sin_port);
}