Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions binding/Binding.Shared/LibraryLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,17 @@ private static class Linux

private const int RTLD_LAZY = 1;
private const int RTLD_NOW = 2;
private const int RTLD_DEEPBIND = 8;

private static bool UseSystemLibrary2 = true;

public static IntPtr dlopen (string path, bool lazy = true)
{
try {
return dlopen2 (path, lazy ? RTLD_LAZY : RTLD_NOW);
return dlopen2 (path, (lazy ? RTLD_LAZY : RTLD_NOW) | RTLD_DEEPBIND);
} catch (DllNotFoundException) {
UseSystemLibrary2 = false;
return dlopen1 (path, lazy ? RTLD_LAZY : RTLD_NOW);
return dlopen1 (path, (lazy ? RTLD_LAZY : RTLD_NOW) | RTLD_DEEPBIND);
}
}

Expand Down