mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
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.
This commit is contained in:
parent
579eb7cf41
commit
2b82c83ceb
Notes:
sideshowbarker
2024-07-17 09:40:13 +09:00
Author: https://github.com/FireFox317 Commit: https://github.com/SerenityOS/serenity/commit/2b82c83ceb Pull-request: https://github.com/SerenityOS/serenity/pull/14481
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue