diff options
Diffstat (limited to 'devel/glib2/patches/patch-ab')
-rw-r--r-- | devel/glib2/patches/patch-ab | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/devel/glib2/patches/patch-ab b/devel/glib2/patches/patch-ab index 2f59bceb586..1ace88d4cbe 100644 --- a/devel/glib2/patches/patch-ab +++ b/devel/glib2/patches/patch-ab @@ -1,10 +1,10 @@ -$NetBSD: patch-ab,v 1.11 2005/03/02 15:38:08 wiz Exp $ +$NetBSD: patch-ab,v 1.12 2007/11/08 19:52:21 drochner Exp $ http://bugzilla.gnome.org/show_bug.cgi?id=140329 ---- gmodule/gmodule.c.orig 2005-01-02 17:03:56.000000000 +0100 +--- gmodule/gmodule.c.orig 2007-10-16 07:44:43.000000000 +0200 +++ gmodule/gmodule.c -@@ -560,6 +560,24 @@ g_module_error (void) +@@ -599,6 +599,31 @@ g_module_error (void) return g_static_private_get (&module_error_private); } @@ -13,23 +13,30 @@ http://bugzilla.gnome.org/show_bug.cgi?id=140329 + const gchar *symbol_name, + gpointer *symbol) +{ ++ gpointer hdl = module->handle; ++#if defined (G_MODULE_BROKEN_DLOPEN_NULL) && defined(__NetBSD__) && defined(RTLD_DEFAULT) ++ /* use some special handle to access global namespace */ ++ if (module == main_module) ++ hdl = RTLD_DEFAULT; ++#endif ++ +#ifdef G_MODULE_NEED_USCORE + { + gchar *name; + + name = g_strconcat ("_", symbol_name, NULL); -+ *symbol = _g_module_symbol (module->handle, name); ++ *symbol = _g_module_symbol (hdl, name); + g_free (name); + } +#else /* !G_MODULE_NEED_USCORE */ -+ *symbol = _g_module_symbol (module->handle, symbol_name); ++ *symbol = _g_module_symbol (hdl, symbol_name); +#endif /* !G_MODULE_NEED_USCORE */ +} + gboolean g_module_symbol (GModule *module, const gchar *symbol_name, -@@ -577,17 +595,28 @@ g_module_symbol (GModule *module, +@@ -616,17 +641,28 @@ g_module_symbol (GModule *module, g_static_rec_mutex_lock (&g_module_global_lock); |