From 79e2007d30968be1e15040f0a4bb49799631659a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Mon, 5 Feb 2024 19:59:55 +0800 Subject: [PATCH] Revert "Platform (Linux): use $HOSTNAME if available" $HOSTNAME doesn't seem to be a standard variable This reverts commit 02eb604ceb69f150d3ea104190ef924628001357. --- src/util/platform/FFPlatform_unix.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/util/platform/FFPlatform_unix.c b/src/util/platform/FFPlatform_unix.c index 22066964d..255211a34 100644 --- a/src/util/platform/FFPlatform_unix.c +++ b/src/util/platform/FFPlatform_unix.c @@ -150,10 +150,7 @@ static void getUserName(FFPlatform* platform, const struct passwd* pwd) static void getHostName(FFPlatform* platform, const struct utsname* uts) { - const char* hostname = getenv("HOSTNAME"); - if(!ffStrSet(hostname) && uts) - hostname = uts->nodename; - ffStrbufAppendS(&platform->hostName, hostname); + ffStrbufAppendS(&platform->hostName, uts->nodename); } static void getUserShell(FFPlatform* platform, const struct passwd* pwd)