summaryrefslogtreecommitdiff
path: root/gmodule
diff options
context:
space:
mode:
authorEmmanuel Fleury <emmanuel.fleury@gmail.com>2022-10-25 17:31:25 +0200
committerEmmanuel Fleury <emmanuel.fleury@gmail.com>2022-10-25 17:31:25 +0200
commit81e44985658b120456525d6fa53742aa0f8c4346 (patch)
tree4fa43b2910c2d01f08fd44330c5ebb55939234c7 /gmodule
parent86430a27d26b9b72b02ff0b81eeaa5df0525646c (diff)
downloadglib-81e44985658b120456525d6fa53742aa0f8c4346.tar.gz
Handle plugable g_modules through RTLD_DEFAULT for NetBSD
fix issue #19
Diffstat (limited to 'gmodule')
-rw-r--r--gmodule/gmodule-dl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gmodule/gmodule-dl.c b/gmodule/gmodule-dl.c
index c1c2fcec2..1ae90aa12 100644
--- a/gmodule/gmodule-dl.c
+++ b/gmodule/gmodule-dl.c
@@ -167,7 +167,7 @@ _g_module_self (void)
* NULL is given, dlsym returns an appropriate pointer.
*/
lock_dlerror ();
-#if defined(__BIONIC__)
+#if defined(__BIONIC__) || defined(__NetBSD__)
handle = RTLD_DEFAULT;
#else
handle = dlopen (NULL, RTLD_GLOBAL | RTLD_LAZY);
@@ -182,7 +182,7 @@ _g_module_self (void)
static void
_g_module_close (gpointer handle)
{
-#if defined(__BIONIC__)
+#if defined(__BIONIC__) || defined(__NetBSD__)
if (handle != RTLD_DEFAULT)
#endif
{