Files
nixpkgs/pkgs/development/libraries/glib/gmodule-rtld_local.patch
T
Randy Eckenrode bdc870b17a glib: make sure RTLD_LOCAL is used for G_MODULE_BIND_LOCAL
Unlike Linux, Darwin defines `RTLD_LOCAL` as a non-zero value.
2024-06-09 09:05:43 -04:00

14 lines
496 B
Diff

diff --git a/gmodule/gmodule-dl.c b/gmodule/gmodule-dl.c
index 6d1c5fab7..b21773bca 100644
--- a/gmodule/gmodule-dl.c
+++ b/gmodule/gmodule-dl.c
@@ -136,7 +136,7 @@ _g_module_open (const gchar *file_name,
lock_dlerror ();
handle = dlopen (file_name,
- (bind_local ? 0 : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY : RTLD_NOW));
+ (bind_local ? RTLD_LOCAL : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY : RTLD_NOW));
if (!handle)
{
const gchar *message = fetch_dlerror (TRUE);