Summary: | dev-libs/openssl-1.0.x[ipv6] fails on non-GNU platforms due to gethostbyname2() usage | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Sean McGovern <gseanmcg> |
Component: | Other | Assignee: | Gentoo non-Linux Team <alt> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | base-system, bertrand |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Other | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
i686-w64-mingw32 - emerge --info
i686-w64-mingw32 - build.log |
Description
Sean McGovern
2013-02-11 20:39:48 UTC
Created attachment 378886 [details]
i686-w64-mingw32 - emerge --info
Created attachment 378888 [details]
i686-w64-mingw32 - build.log
Same result on x86_64-w64-mingw32 than attachment #378886 [details]
man 2 gethostbyname say : NOTES (..) GNU extensions Glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong. (..) See Also: http://rt.openssl.org/Ticket/Display.html?id=2051 Login: guest/guest still broken on x86_64-w64-mingw32 for dev-libs/openssl-1.0.2k Do you have getipnodebyname available? In Prefix we carry the following patch, but perhaps it can go without the extra ifdef (linux and darwin seem to have getipnodebyname too): --- apps/s_socket.c +++ apps/s_socket.c @@ -718,8 +718,13 @@ if (domain == AF_INET) ret = gethostbyname(name); # if OPENSSL_USE_IPV6 +# if defined (__SVR4) && defined (__sun) + else + ret = getipnodebyname(name, AF_INET6, AI_DEFAULT, NULL); +# else else ret = gethostbyname2(name, AF_INET6); +# endif # endif if (ret == NULL) return (NULL); (https://gitweb.gentoo.org/repo/proj/prefix.git/plain/dev-libs/openssl/files/openssl-1.0.2-gethostbyname2-solaris.patch) To be frank I have no idea how I'd check if I had that or not. would you say that just dropping that as a patch into the user patches dir should work? (In reply to Fabian Groffen from comment #6) > Do you have getipnodebyname available? In Prefix we carry the following > patch, but perhaps it can go without the extra ifdef (linux and darwin seem > to have getipnodebyname too): > > --- apps/s_socket.c > +++ apps/s_socket.c > @@ -718,8 +718,13 @@ > if (domain == AF_INET) > ret = gethostbyname(name); > # if OPENSSL_USE_IPV6 > +# if defined (__SVR4) && defined (__sun) > + else > + ret = getipnodebyname(name, AF_INET6, AI_DEFAULT, NULL); > +# else > else > ret = gethostbyname2(name, AF_INET6); > +# endif > # endif > if (ret == NULL) > return (NULL); > > > (https://gitweb.gentoo.org/repo/proj/prefix.git/plain/dev-libs/openssl/files/ > openssl-1.0.2-gethostbyname2-solaris.patch) A quick recursive grep seems to show this is not available under the mingw64-runtime Presumably, 1.1.x contains proper ipv6 support. Akamai has a patch that uses getaddrinfo (like it should) The problem is mostly for mingw if I understand correctly. Can we disable ipv6 support for that platform for 1.0.x? 1.0.x is long-masked and will be removed soon enough. |