Use RTLD_DEFAULT to access symbols from the main program + already loaded dlls (previous version did not work under FreeBSD).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8494 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Alain Frisch 2007-11-08 10:55:57 +00:00
parent 90addd658c
commit 8de0859214
1 changed files with 2 additions and 2 deletions

View File

@ -343,12 +343,12 @@ void * caml_dlsym(void * handle, char * name)
void * caml_globalsym(char * name)
{
return caml_dlsym(dlopen(NULL,RTLD_GLOBAL), name);
return caml_dlsym(RTLD_DEFAULT, name);
}
char * caml_dlerror(void)
{
return dlerror();
return (char*) dlerror();
}
#endif