diff options
author | Timon Kruiper <timonkruiper@gmail.com> | 2022-07-05 16:19:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-07-06 14:24:23 +0200 |
commit | 2b82c83cebf15831f24196dbefd483f4a208de39 (patch) | |
tree | c1eb20d0a7592f9ee75c0ba1b6ee9118acc67256 /Userland/Services | |
parent | 579eb7cf419cefa02eb46429c092b6e3641273cb (diff) | |
download | serenity-2b82c83cebf15831f24196dbefd483f4a208de39.zip |
LookupServer: Use _POSIX_HOST_NAME_MAX instead of HOST_NAME_MAX
HOST_NAME_MAX is not defined on the BSDs, including macOS. Use
_POSIX_HOST_NAME_MAX instead, which is defined on all the platforms.
Diffstat (limited to 'Userland/Services')
-rw-r--r-- | Userland/Services/LookupServer/LookupServer.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/LookupServer/MulticastDNS.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Services/LookupServer/LookupServer.cpp b/Userland/Services/LookupServer/LookupServer.cpp index 714c26c1b0..747aafeccc 100644 --- a/Userland/Services/LookupServer/LookupServer.cpp +++ b/Userland/Services/LookupServer/LookupServer.cpp @@ -126,7 +126,7 @@ void LookupServer::load_etc_hosts() static String get_hostname() { - char buffer[HOST_NAME_MAX]; + char buffer[_POSIX_HOST_NAME_MAX]; VERIFY(gethostname(buffer, sizeof(buffer)) == 0); return buffer; } diff --git a/Userland/Services/LookupServer/MulticastDNS.cpp b/Userland/Services/LookupServer/MulticastDNS.cpp index 342c611584..b987334ec1 100644 --- a/Userland/Services/LookupServer/MulticastDNS.cpp +++ b/Userland/Services/LookupServer/MulticastDNS.cpp @@ -22,7 +22,7 @@ MulticastDNS::MulticastDNS(Object* parent) : Core::UDPServer(parent) , m_hostname("courage.local") { - char buffer[HOST_NAME_MAX]; + char buffer[_POSIX_HOST_NAME_MAX]; if (gethostname(buffer, sizeof(buffer)) < 0) { perror("gethostname"); } else { |