Fixes, tweaks and improvements for Linux support

This commit is contained in:
Wojtek Figat
2021-02-16 20:21:23 +01:00
parent 6fd1580d67
commit bcc3b2bd59
3 changed files with 35 additions and 29 deletions

View File

@@ -2140,7 +2140,12 @@ int32 LinuxPlatform::RunProcess(const StringView& cmdLine, const StringView& wor
void* LinuxPlatform::LoadLibrary(const Char* filename)
{
const StringAsANSI<> filenameANSI(filename);
return dlopen(filenameANSI.Get(), RTLD_LAZY);
void* result = dlopen(filenameANSI.Get(), RTLD_LAZY | RTLD_LOCAL);
if (!result)
{
LOG(Error, "Failed to load {0} because {1}", filename, String(dlerror()));
}
return result;
}
void LinuxPlatform::FreeLibrary(void* handle)