Commit 8478cece authored by Alexandre Julliard's avatar Alexandre Julliard

libwine: Update LD_LIBRARY_PATH in the current process from the JNI environment.

parent c27e5ca5
...@@ -873,6 +873,12 @@ static jstring wine_init_jni( JNIEnv *env, jobject obj, jobjectArray cmdline, jo ...@@ -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 ); const char *val = (*env)->GetStringUTFChars( env, val_obj, NULL );
setenv( var, val, 1 ); 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 ); (*env)->ReleaseStringUTFChars( env, val_obj, val );
} }
else unsetenv( var ); else unsetenv( var );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment