summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qhostinfo_unix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/kernel/qhostinfo_unix.cpp')
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index 876d167bdd..af1eaf2bf4 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -50,13 +50,12 @@
#include <qurl.h>
#include <qfile.h>
#include <private/qmutexpool_p.h>
+#include <private/qnet_unix_p.h>
-extern "C" {
#include <sys/types.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <resolv.h>
-}
#if defined (QT_NO_GETADDRINFO)
#include <qmutex.h>
@@ -178,7 +177,7 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
}
results.setHostName(QString::fromLatin1(hbuf));
#else
- in_addr_t inetaddr = inet_addr(hostName.toLatin1().constData());
+ in_addr_t inetaddr = qt_safe_inet_addr(hostName.toLatin1().constData());
struct hostent *ent = gethostbyaddr((const char *)&inetaddr, sizeof(inetaddr), AF_INET);
if (!ent) {
results.setError(QHostInfo::HostNotFound);