QHostInfo: Remove Darwin refusal to use getnameinfo(3)
This #if has been there since 0248ec4054b (Oct 2005), presumably due to bugs reported after the Qt 4.0 release (the first containing QHostInfo). Any macOS issues with getnameinfo() have long since been gone. I've confirmed that it works on 10.9, 10.10, 10.11 and 10.12, so I'm dropping the #ifndef. [ChangeLog][Deprecation Notice] Starting with Qt 5.10, IPv6 support will be mandatory for all platforms. Systems without proper IPv6 support, such as the getaddrinfo() function or the proper socket address structures, will not be able to build QtNetwork anymore. Change-Id: I320d9d2f42284a69a4cbfffd14dd5bf479e5f678 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
643d19f87b
commit
797530c3f8
@ -150,8 +150,7 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
|
||||
QHostAddress address;
|
||||
if (address.setAddress(hostName)) {
|
||||
// Reverse lookup
|
||||
// Reverse lookups using getnameinfo are broken on darwin, use gethostbyaddr instead.
|
||||
#if !defined (QT_NO_GETADDRINFO) && !defined (Q_OS_DARWIN)
|
||||
#if !defined (QT_NO_GETADDRINFO)
|
||||
sockaddr_in sa4;
|
||||
sockaddr_in6 sa6;
|
||||
sockaddr *sa = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user