Alexandre Julliard : libwine: Look for all libraries in the dll search path on Android.

Alexandre Julliard julliard at winehq.org
Thu Sep 26 15:44:06 CDT 2013


Module: wine
Branch: master
Commit: 626be2eab12e75bbfe198621875218feb93c19ac
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=626be2eab12e75bbfe198621875218feb93c19ac

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Sep 26 18:15:08 2013 +0200

libwine: Look for all libraries in the dll search path on Android.

---

 libs/wine/loader.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/libs/wine/loader.c b/libs/wine/loader.c
index 01cc57a..5891a20 100644
--- a/libs/wine/loader.c
+++ b/libs/wine/loader.c
@@ -902,6 +902,23 @@ void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize
         ret = dlopen( path, flag | RTLD_FIRST );
     }
     else
+#elif defined(__ANDROID__)
+    if (!strchr( filename, '/' ) && nb_dll_paths)
+    {
+        unsigned int i;
+        char *buffer = malloc( dll_path_maxlen + strlen(filename) + 2 );
+
+        buffer[dll_path_maxlen] = '/';
+        strcpy( buffer + dll_path_maxlen + 1, filename );
+        for (i = 0; i < nb_dll_paths; i++)
+        {
+            char *path = prepend( buffer + dll_path_maxlen, dll_paths[i], strlen(dll_paths[i]) );
+            ret = dlopen( path, flag | RTLD_FIRST );
+            if (ret) break;
+        }
+        free( buffer );
+        if (ret) return ret;
+    }
 #endif
     ret = dlopen( filename, flag | RTLD_FIRST );
     s = dlerror();




More information about the wine-cvs mailing list