summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/kernel')
-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 af1eaf2..a63659e 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -55,7 +55,11 @@
#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>
@@ -273,10 +277,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"));
@@ -313,6 +319,7 @@ QString QHostInfo::localHostName()
QString QHostInfo::localDomainName()
{
+#if !defined(Q_OS_VXWORKS)
resolveLibrary();
if (local_res_ninit) {
// using thread-safe version
@@ -343,7 +350,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)