summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-10-10 23:51:34 -0400
committermidipix <writeonce@midipix.org>2016-10-10 23:51:34 -0400
commitca0f583ed2fd0fa7de8ac5ff71145ce0dd1a14f7 (patch)
tree6f3712e7db237b8d63347480bb69b3add6a1d95f
parentbe8c406f9fea929e2eac4006c446f164ad25ba91 (diff)
downloadmmglue-ca0f583ed2fd0fa7de8ac5ff71145ce0dd1a14f7.tar.bz2
mmglue-ca0f583ed2fd0fa7de8ac5ff71145ce0dd1a14f7.tar.xz
psxglue.h: ldso: extend & future-proof the signature of the internal dlopen().
-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)