diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2007-11-10 16:32:20 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2007-11-10 16:32:20 +0000 |
commit | ae10d23072af60c7d8e9592a93078d2ef7aac3c5 (patch) | |
tree | 9be91f6d3c5348f5cd9a08a39e4f6cf980e676ea /byterun/unix.c | |
parent | 2f9fff806a3bf10aa8e4a1312db1965a0dc1cee1 (diff) |
Issues with RTLD_DEFAULT not defined in Glibc, unless _GNU_SOURCE is set
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8505 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/unix.c')
-rw-r--r-- | byterun/unix.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/byterun/unix.c b/byterun/unix.c index 127d1bad3..0eb979f0a 100644 --- a/byterun/unix.c +++ b/byterun/unix.c @@ -15,6 +15,9 @@ /* Unix-specific stuff */ +#define _GNU_SOURCE + /* Helps finding RTLD_DEFAULT in glibc */ + #include <stddef.h> #include <stdlib.h> #include <string.h> @@ -343,7 +346,11 @@ void * caml_dlsym(void * handle, char * name) void * caml_globalsym(char * name) { +#ifdef RTLD_DEFAULT return caml_dlsym(RTLD_DEFAULT, name); +#else + return NULL; +#endif } char * caml_dlerror(void) |