2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-11-20 05:30:11 -07:00
repo/extra/firefox/patches/musl-use-res_query.patch
2024-02-21 00:26:10 -06:00

19 lines
862 B
Diff

diff --git a/netwerk/dns/PlatformDNSUnix.cpp b/netwerk/dns/PlatformDNSUnix.cpp
index 753d786..f831b7b 100644
--- a/netwerk/dns/PlatformDNSUnix.cpp
+++ b/netwerk/dns/PlatformDNSUnix.cpp
@@ -32,11 +32,11 @@ nsresult ResolveHTTPSRecordImpl(const nsACString& aHost, uint16_t aFlags,
rv = packet.FillBuffer(
[&](unsigned char response[DNSPacket::MAX_SIZE]) -> int {
int len = 0;
-#if defined(XP_LINUX)
+#if defined(XP_LINUX) && defined(__GLIBC__)
len = res_nquery(&_res, host.get(), ns_c_in,
nsIDNSService::RESOLVE_TYPE_HTTPSSVC, response,
DNSPacket::MAX_SIZE);
-#elif defined(XP_MACOSX)
+#elif defined(XP_MACOSX) || defined(XP_LINUX)
len =
res_query(host.get(), ns_c_in, nsIDNSService::RESOLVE_TYPE_HTTPSSVC,
response, DNSPacket::MAX_SIZE);