summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-07-08 17:22:01 +0900
committerSlávek Banko <slavek.banko@axis.cz>2021-02-02 01:30:20 +0100
commit8a351bdbd9f2976839d6efb246606199851b39a6 (patch)
treea587758b200a997ebc71f1728cbfd3b696f22fe2
parent0dca9724e927a58d3951ef645c1caad363dcc214 (diff)
downloadqt3-8a351bdbd9f2976839d6efb246606199851b39a6.tar.gz
qt3-8a351bdbd9f2976839d6efb246606199851b39a6.zip
Improve modern res API available condition
`__RES` is usable to check release date of resolver library. Such modern res API appeared in BIND-8.2.0 libbind with __RES == 19980901, it was refrected as BIND-8.2.2-P5 in glibc in pre 2.3 release with __RES == 19991006. Signed-off-by: OBATA Akio <obache@wizdas.com> (cherry picked from commit b676c7f90b894b7c715d924c53b9dc4b4fef4589)
-rw-r--r--src/network/qdns.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/qdns.cpp b/src/network/qdns.cpp
index 33f6d2e..965eae9 100644
--- a/src/network/qdns.cpp
+++ b/src/network/qdns.cpp
@@ -102,7 +102,6 @@ static Q_UINT32 now()
return 0;
}
-
static QPtrList<QHostAddress> * ns = 0;
static QStrList * domains = 0;
static bool ipv6support = FALSE;
@@ -2539,7 +2538,7 @@ void QDns::doSynchronousLookup()
}
#endif
-#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 3)))
+#if defined(__RES) && (__RES >= 19980901)
#define Q_MODERN_RES_API
#else
#endif