summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-10-24 12:48:39 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-10-24 12:48:42 +0200
commit840f6a40e6218992b5b9d451ee3c0886a4846c89 (patch)
tree2b808decc7adf5218b810d2de6b45c5a8b4cfc42 /src/network/kernel
parent109bf980b37fed405c6c1eb14cb9c83ff897e389 (diff)
parent2e3870fe37d36ccf4bd84eb90e1d5e08ad00c1bc (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'src/network/kernel')
-rw-r--r--src/network/kernel/qdnslookup_unix.cpp15
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp15
2 files changed, 26 insertions, 4 deletions
diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp
index 729729d929..052c492f07 100644
--- a/src/network/kernel/qdnslookup_unix.cpp
+++ b/src/network/kernel/qdnslookup_unix.cpp
@@ -52,6 +52,10 @@
#include <arpa/nameser_compat.h>
#include <resolv.h>
+#ifdef __GNU_LIBRARY__
+# include <gnu/lib-names.h>
+#endif
+
QT_BEGIN_NAMESPACE
#ifndef QT_NO_LIBRARY
@@ -77,9 +81,16 @@ struct QDnsLookupStateDeleter
static void resolveLibrary()
{
- QLibrary lib(QLatin1String("resolv"));
+ QLibrary lib;
+#ifdef LIBRESOLV_SO
+ lib.setFileName(QStringLiteral(LIBRESOLV_SO));
if (!lib.load())
- return;
+#endif
+ {
+ lib.setFileName(QLatin1String("resolv"));
+ if (!lib.load())
+ return;
+ }
local_dn_expand = dn_expand_proto(lib.resolve("__dn_expand"));
if (!local_dn_expand)
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index 04daf2ecdd..dc2702b552 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -63,6 +63,10 @@
# include <resolv.h>
#endif
+#ifdef __GNU_LIBRARY__
+# include <gnu/lib-names.h>
+#endif
+
#if defined (QT_NO_GETADDRINFO)
static QBasicMutex getHostByNameMutex;
#endif
@@ -93,9 +97,16 @@ static res_state_ptr local_res = 0;
static void resolveLibrary()
{
#if !defined(QT_NO_LIBRARY) && !defined(Q_OS_QNX)
- QLibrary lib(QLatin1String("resolv"));
+ QLibrary lib;
+#ifdef LIBRESOLV_SO
+ lib.setFileName(QStringLiteral(LIBRESOLV_SO));
if (!lib.load())
- return;
+#endif
+ {
+ lib.setFileName(QLatin1String("resolv"));
+ if (!lib.load())
+ return;
+ }
local_res_init = res_init_proto(lib.resolve("__res_init"));
if (!local_res_init)