summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <[email protected]>2020-07-09 11:00:32 +0900
committerSlávek Banko <[email protected]>2020-07-09 14:45:51 +0200
commit9a9b43b33e354917aaa15b39adc1237bb41dc464 (patch)
tree41452e88e9e973c57215a68ca880eaaf412af54a
parent4ebe4e17618ebd8d87a55c2e940750431d8b875f (diff)
downloadtqt3-9a9b43b33e354917aaa15b39adc1237bb41dc464.tar.gz
tqt3-9a9b43b33e354917aaa15b39adc1237bb41dc464.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 to glibc at pre 2.3 release with `__RES == 19991006`. Signed-off-by: OBATA Akio <[email protected]> (cherry picked from commit b79f0a7caabbf6e3523dad0a284466a672bc9940)
-rw-r--r--src/network/qdns.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/qdns.cpp b/src/network/qdns.cpp
index 9f370a8ee..66dcc18c0 100644
--- a/src/network/qdns.cpp
+++ b/src/network/qdns.cpp
@@ -102,7 +102,7 @@ static TQ_UINT32 now()
return 0;
}
-#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 3)))
+#if defined(__RES) && (__RES >= 19980901)
#define Q_MODERN_RES_API
#else
#endif