Closed Bug 1881123 Opened 2 years ago Closed 2 years ago

Use res_query on musl libc instead of res_nquery

Categories

(Core :: Networking: DNS, defect, P2)

defect

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: ptrcnull, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

musl doesn't have res_nquery - an easy fix would be to make the res_nquery depend on GNU Libc as well as XP_LINUX, and let musl builds fall back to the (currently) macOS branch with res_query

Summary: Use res_query on musl libc as well → Use res_query on musl libc instead of res_nqueyr
Summary: Use res_query on musl libc instead of res_nqueyr → Use res_query on musl libc instead of res_nquery

I guess we can gate this on HAVE_RES_NINIT instead.

Blocks: 1852752
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]

Reproducible with firefox-123.0 (Gentoo Linux amd64 musl libc)

diff --git a/netwerk/dns/PlatformDNSUnix.cpp b/netwerk/dns/PlatformDNSUnix.cpp
index 753d786..14f7923 100644
--- a/netwerk/dns/PlatformDNSUnix.cpp
+++ b/netwerk/dns/PlatformDNSUnix.cpp
@@ -32,7 +32,7 @@ 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(HAVE_RES_NINIT)
         len = res_nquery(&_res, host.get(), ns_c_in,
                          nsIDNSService::RESOLVE_TYPE_HTTPSSVC, response,
                          DNSPacket::MAX_SIZE);

I think this was fixed by bug 1881437.
Please let me know if you're still seeing failures.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1881437
Resolution: --- → DUPLICATE
Depends on: 1881437
No longer duplicate of bug: 1881437
Resolution: DUPLICATE → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.