summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--arch/nt32/psxglue.h2
-rw-r--r--arch/nt64/psxglue.h2
-rw-r--r--src/ldso/nt32/dynlink.c6
-rw-r--r--src/ldso/nt64/dynlink.c6
4 files changed, 12 insertions, 4 deletions
diff --git a/arch/nt32/psxglue.h b/arch/nt32/psxglue.h
index d00410e..1eda04b 100644
--- a/arch/nt32/psxglue.h
+++ b/arch/nt32/psxglue.h
@@ -9,7 +9,7 @@
typedef int __ldso_dladdr(const void * addr, void * info);
typedef int __ldso_dlinfo(void * dso, int req, void * res);
typedef void * __ldso_dlsym(void * p, const char * s, void * ra);
-typedef void * __ldso_dlopen(const char * file, int mode);
+typedef void * __ldso_dlopen(const char * file, int mode, const char * path, void * reserved);
typedef int __ldso_dlclose(void *p);
typedef char * __ldso_dlerror(void);
typedef void __ldso_reset_tls(void);
diff --git a/arch/nt64/psxglue.h b/arch/nt64/psxglue.h
index d00410e..1eda04b 100644
--- a/arch/nt64/psxglue.h
+++ b/arch/nt64/psxglue.h
@@ -9,7 +9,7 @@
typedef int __ldso_dladdr(const void * addr, void * info);
typedef int __ldso_dlinfo(void * dso, int req, void * res);
typedef void * __ldso_dlsym(void * p, const char * s, void * ra);
-typedef void * __ldso_dlopen(const char * file, int mode);
+typedef void * __ldso_dlopen(const char * file, int mode, const char * path, void * reserved);
typedef int __ldso_dlclose(void *p);
typedef char * __ldso_dlerror(void);
typedef void __ldso_reset_tls(void);
diff --git a/src/ldso/nt32/dynlink.c b/src/ldso/nt32/dynlink.c
index edfa4a8..c1fab74 100644
--- a/src/ldso/nt32/dynlink.c
+++ b/src/ldso/nt32/dynlink.c
@@ -1,5 +1,6 @@
#define _BSD_SOURCE
+#include <stdlib.h>
#include <dlfcn.h>
#include "psxglue.h"
#include "pthread_impl.h"
@@ -23,7 +24,10 @@ void *__dlsym(void * restrict p, const char * restrict s, void * restrict ra)
void * dlopen(const char * file, int mode)
{
- return __ldso_vtbl->dlopen(file,mode);
+ return __ldso_vtbl->dlopen(
+ file,mode,
+ getenv("LD_LIBRARY_PATH"),
+ 0);
}
int dlclose(void *p)
diff --git a/src/ldso/nt64/dynlink.c b/src/ldso/nt64/dynlink.c
index edfa4a8..c1fab74 100644
--- a/src/ldso/nt64/dynlink.c
+++ b/src/ldso/nt64/dynlink.c
@@ -1,5 +1,6 @@
#define _BSD_SOURCE
+#include <stdlib.h>
#include <dlfcn.h>
#include "psxglue.h"
#include "pthread_impl.h"
@@ -23,7 +24,10 @@ void *__dlsym(void * restrict p, const char * restrict s, void * restrict ra)
void * dlopen(const char * file, int mode)
{
- return __ldso_vtbl->dlopen(file,mode);
+ return __ldso_vtbl->dlopen(
+ file,mode,
+ getenv("LD_LIBRARY_PATH"),
+ 0);
}
int dlclose(void *p)