diff options
Diffstat (limited to 'src/network/kernel/qhostinfo_unix.cpp')
-rw-r--r-- | src/network/kernel/qhostinfo_unix.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp index 032e575..78df510 100644 --- a/src/network/kernel/qhostinfo_unix.cpp +++ b/src/network/kernel/qhostinfo_unix.cpp @@ -53,12 +53,10 @@ static const int RESOLVER_TIMEOUT = 2000; #include <qfile.h> #include <private/qmutexpool_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> @@ -180,7 +178,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); |