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.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index fef488b..64e9e29 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -57,7 +57,11 @@ static const int RESOLVER_TIMEOUT = 2000;
#include <sys/types.h>
#include <netdb.h>
#include <arpa/inet.h>
-#include <resolv.h>
+#if defined(Q_OS_VXWORKS)
+# include <hostLib.h>
+#else
+# include <resolv.h>
+#endif
#if defined (QT_NO_GETADDRINFO)
#include <qmutex.h>
@@ -275,10 +279,12 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
results.setError(QHostInfo::UnknownError);
results.setErrorString(tr("Unknown address type"));
}
+#if !defined(Q_OS_VXWORKS)
} else if (h_errno == HOST_NOT_FOUND || h_errno == NO_DATA
|| h_errno == NO_ADDRESS) {
results.setError(QHostInfo::HostNotFound);
results.setErrorString(tr("Host not found"));
+#endif
} else {
results.setError(QHostInfo::UnknownError);
results.setErrorString(tr("Unknown error"));
@@ -315,6 +321,7 @@ QString QHostInfo::localHostName()
QString QHostInfo::localDomainName()
{
+#if !defined(Q_OS_VXWORKS)
resolveLibrary();
if (local_res_ninit) {
// using thread-safe version
@@ -344,7 +351,7 @@ QString QHostInfo::localDomainName()
domainName = QUrl::fromAce(local_res->dnsrch[0]);
return domainName;
}
-
+#endif
// nothing worked, try doing it by ourselves:
QFile resolvconf;
#if defined(_PATH_RESCONF)