about summary refs log tree commit diff
path: root/dlfcn/dlopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'dlfcn/dlopen.c')
-rw-r--r--dlfcn/dlopen.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/dlfcn/dlopen.c b/dlfcn/dlopen.c
index 6381ffc9b1..1e2111e71f 100644
--- a/dlfcn/dlopen.c
+++ b/dlfcn/dlopen.c
@@ -19,6 +19,8 @@
 
 #include <dlfcn.h>
 #include <stddef.h>
+#include <unistd.h>
+#include <ldsodefs.h>
 
 #if !defined SHARED && defined IS_IN_libdl
 
@@ -56,8 +58,10 @@ dlopen_doit (void *a)
 {
   struct dlopen_args *args = (struct dlopen_args *) a;
 
-  args->new = _dl_open (args->file ?: "", args->mode | __RTLD_DLOPEN,
-			args->caller, args->file == NULL ? LM_ID_BASE : NS);
+  args->new = GLRO(dl_open) (args->file ?: "", args->mode | __RTLD_DLOPEN,
+			     args->caller,
+			     args->file == NULL ? LM_ID_BASE : NS,
+			     __dlfcn_argc, __dlfcn_argv, __environ);
 }