From f3960b22b12db14530191880e5153d5bad6ac4fc Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 30 Mar 2007 12:17:01 +0200 Subject: [PATCH] libwine: Hack to work around the Solaris dlopen() brain damage. --- libs/wine/loader.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libs/wine/loader.c b/libs/wine/loader.c index 4a089eef3b7..a86da98b921 100644 --- a/libs/wine/loader.c +++ b/libs/wine/loader.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -689,6 +690,16 @@ void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize void *ret; const char *s; dlerror(); dlerror(); +#ifdef __sun + if (strchr( filename, ':' )) + { + char path[PATH_MAX]; + /* Solaris' brain damaged dlopen() treats ':' as a path separator */ + realpath( filename, path ); + ret = dlopen( path, flag | RTLD_FIRST ); + } + else +#endif ret = dlopen( filename, flag | RTLD_FIRST ); s = dlerror(); if (error && errorsize)