From fcced975099c8eabdc4f474c2b6c1bcc57cfc3f4 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sun, 3 Sep 2023 20:59:51 +0300 Subject: [PATCH] LookupServer: Fix building on GNU Hurd The Hurd has sin_len, just like the BSDs. This happened to hit a clang-format bug, and we have been advised to disable clang-format for this block of code for now. --- Userland/Services/LookupServer/MulticastDNS.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Userland/Services/LookupServer/MulticastDNS.h b/Userland/Services/LookupServer/MulticastDNS.h index 8b59a2415a..9c712ba097 100644 --- a/Userland/Services/LookupServer/MulticastDNS.h +++ b/Userland/Services/LookupServer/MulticastDNS.h @@ -36,8 +36,11 @@ private: Name m_hostname; + // https://github.com/llvm/llvm-project/issues/56685 + // https://github.com/llvm/llvm-project/pull/65409 + // clang-format off static constexpr sockaddr_in mdns_addr { -#ifdef AK_OS_BSD_GENERIC +#if defined(AK_OS_BSD_GENERIC) || defined(AK_OS_GNU_HURD) .sin_len = sizeof(struct sockaddr_in), #endif .sin_family = AF_INET, @@ -47,6 +50,7 @@ private: .sin_addr = { 0xfb0000e0 }, .sin_zero = { 0 } }; + // clang-format on }; }