From: kgv Date: Sun, 21 Mar 2021 20:26:56 +0000 (+0300) Subject: OSD_Process::UserName() - do not call getpwuid() within WebAssembly X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=d61c8e7209253630e9b5d8690a7f197e1a1b89be;p=occt-copy.git OSD_Process::UserName() - do not call getpwuid() within WebAssembly --- 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 (){