summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qhostinfo_unix.cpp
diff options
context:
space:
mode:
authorRobert Griebl <rgriebl@trolltech.com>2009-07-14 12:56:27 (GMT)
committerRobert Griebl <rgriebl@trolltech.com>2009-07-14 13:16:16 (GMT)
commit93db2c44b7b01eb08ef6f447d4a84198b2dcd1e3 (patch)
tree2e27c4a17b82d05630ddaa10b2ab09bf97c27c58 /src/network/kernel/qhostinfo_unix.cpp
parent67e52d5b57e604ba82351b8edb038a5adbaf8c5a (diff)
downloadQt-93db2c44b7b01eb08ef6f447d4a84198b2dcd1e3.zip
Qt-93db2c44b7b01eb08ef6f447d4a84198b2dcd1e3.tar.gz
Qt-93db2c44b7b01eb08ef6f447d4a84198b2dcd1e3.tar.bz2
Socket function cleanup: replacing direct POSIX calls with qt_safe_().
Reviewed-By: Thiago
Diffstat (limited to 'src/network/kernel/qhostinfo_unix.cpp')
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp4
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);