From dd85cb16764661d6bed564396ec583bd64ceb926 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 10 Nov 2021 19:58:47 +0100 Subject: [PATCH] Fix Linux build --- Source/Engine/Platform/Linux/LinuxPlatform.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Engine/Platform/Linux/LinuxPlatform.cpp b/Source/Engine/Platform/Linux/LinuxPlatform.cpp index 9c73b5d1f..e86926fd2 100644 --- a/Source/Engine/Platform/Linux/LinuxPlatform.cpp +++ b/Source/Engine/Platform/Linux/LinuxPlatform.cpp @@ -2016,6 +2016,7 @@ bool LinuxPlatform::Init() ASSERT(UnixCpu.CacheLineSize && Math::IsPowerOfTwo(UnixCpu.CacheLineSize)); // Get user name string + char buffer[UNIX_APP_BUFF_SIZE]; getlogin_r(buffer, UNIX_APP_BUFF_SIZE); OnPlatformUserAdd(New(String(buffer)); @@ -2043,8 +2044,6 @@ bool LinuxPlatform::Init() DeviceId.D = (uint32)UnixCpu.ClockSpeed * UnixCpu.LogicalProcessorCount * UnixCpu.ProcessorCoreCount * UnixCpu.CacheLineSize; } - char buffer[UNIX_APP_BUFF_SIZE]; - // Get user locale string setlocale(LC_ALL, ""); const char* locale = setlocale(LC_CTYPE, NULL);