Alexandre Julliard : libwine: Update LD_LIBRARY_PATH in the current process from the JNI environment.
Module: wine Branch: master Commit: 8478cece692c1498e361388783f515f03c9ca71a URL: http://source.winehq.org/git/wine.git/?a=commit;h=8478cece692c1498e361388783... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jul 24 09:24:49 2014 +0200 libwine: Update LD_LIBRARY_PATH in the current process from the JNI environment. --- libs/wine/loader.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/wine/loader.c b/libs/wine/loader.c index 5c0192d..c2290df 100644 --- a/libs/wine/loader.c +++ b/libs/wine/loader.c @@ -873,6 +873,12 @@ static jstring wine_init_jni( JNIEnv *env, jobject obj, jobjectArray cmdline, jo { const char *val = (*env)->GetStringUTFChars( env, val_obj, NULL ); setenv( var, val, 1 ); + if (!strcmp( var, "LD_LIBRARY_PATH" )) + { + void (*update_func)( const char * ) = dlsym( RTLD_DEFAULT, + "android_update_LD_LIBRARY_PATH" ); + if (update_func) update_func( val ); + } (*env)->ReleaseStringUTFChars( env, val_obj, val ); } else unsetenv( var );
participants (1)
-
Alexandre Julliard