summaryrefslogtreecommitdiffstats
path: root/byterun/unix.c
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2010-08-02 14:37:22 +0000
committerDamien Doligez <damien.doligez-inria.fr>2010-08-02 14:37:22 +0000
commit575555eecd11fcc745e0f1e88d090764b3291b63 (patch)
tree980663cc4b47a8e706079143a22403de6eda968a /byterun/unix.c
parent7c11c2acf98926b16bfc737dadc64ee3d8eff352 (diff)
merge changes from branching of 3.12 to release/3.12.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10643 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/unix.c')
-rw-r--r--byterun/unix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/byterun/unix.c b/byterun/unix.c
index 89e0706e2..cdc1f2a01 100644
--- a/byterun/unix.c
+++ b/byterun/unix.c
@@ -204,13 +204,16 @@ char * caml_dlerror(void)
#ifndef RTLD_GLOBAL
#define RTLD_GLOBAL 0
#endif
+#ifndef RTLD_LOCAL
+#define RTLD_LOCAL 0
+#endif
#ifndef RTLD_NODELETE
#define RTLD_NODELETE 0
#endif
void * caml_dlopen(char * libname, int for_execution, int global)
{
- return dlopen(libname, RTLD_NOW | (global ? RTLD_GLOBAL : 0) | RTLD_NODELETE);
+ return dlopen(libname, RTLD_NOW | (global ? RTLD_GLOBAL : RTLD_LOCAL) | RTLD_NODELETE);
/* Could use RTLD_LAZY if for_execution == 0, but needs testing */
}