Fix Linux build
This commit is contained in:
@@ -2016,6 +2016,7 @@ bool LinuxPlatform::Init()
|
|||||||
ASSERT(UnixCpu.CacheLineSize && Math::IsPowerOfTwo(UnixCpu.CacheLineSize));
|
ASSERT(UnixCpu.CacheLineSize && Math::IsPowerOfTwo(UnixCpu.CacheLineSize));
|
||||||
|
|
||||||
// Get user name string
|
// Get user name string
|
||||||
|
char buffer[UNIX_APP_BUFF_SIZE];
|
||||||
getlogin_r(buffer, UNIX_APP_BUFF_SIZE);
|
getlogin_r(buffer, UNIX_APP_BUFF_SIZE);
|
||||||
OnPlatformUserAdd(New<User>(String(buffer));
|
OnPlatformUserAdd(New<User>(String(buffer));
|
||||||
|
|
||||||
@@ -2043,8 +2044,6 @@ bool LinuxPlatform::Init()
|
|||||||
DeviceId.D = (uint32)UnixCpu.ClockSpeed * UnixCpu.LogicalProcessorCount * UnixCpu.ProcessorCoreCount * UnixCpu.CacheLineSize;
|
DeviceId.D = (uint32)UnixCpu.ClockSpeed * UnixCpu.LogicalProcessorCount * UnixCpu.ProcessorCoreCount * UnixCpu.CacheLineSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
char buffer[UNIX_APP_BUFF_SIZE];
|
|
||||||
|
|
||||||
// Get user locale string
|
// Get user locale string
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
const char* locale = setlocale(LC_CTYPE, NULL);
|
const char* locale = setlocale(LC_CTYPE, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user