From d61c8e7209253630e9b5d8690a7f197e1a1b89be Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 21 Mar 2021 23:26:56 +0300 Subject: [PATCH] OSD_Process::UserName() - do not call getpwuid() within WebAssembly --- src/OSD/OSD_Process.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/OSD/OSD_Process.cxx b/src/OSD/OSD_Process.cxx index d7f4b7923e..917cd92229 100644 --- a/src/OSD/OSD_Process.cxx +++ b/src/OSD/OSD_Process.cxx @@ -99,8 +99,12 @@ Standard_Integer OSD_Process::ProcessId(){ TCollection_AsciiString OSD_Process::UserName() { +#if defined(__EMSCRIPTEN__) + return TCollection_AsciiString(); +#else struct passwd *anInfos = getpwuid (getuid()); return TCollection_AsciiString (anInfos ? anInfos->pw_name : ""); +#endif } Standard_Boolean OSD_Process::IsSuperUser (){ -- 2.39.5