From 797530c3f81b6c5fb8e25e431105fdcd22d8775a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 22 Aug 2017 20:29:16 -0700 Subject: QHostInfo: Remove Darwin refusal to use getnameinfo(3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø Reviewed-by: Edward Welbourne --- src/network/kernel/qhostinfo_unix.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/network') diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp index cf08a15f96..9a24938284 100644 --- a/src/network/kernel/qhostinfo_unix.cpp +++ b/src/network/kernel/qhostinfo_unix.cpp @@ -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; -- cgit v1.2.3