ntdll: Don't use the main exe path as bindir on Android.

The main exe can be the JVM host process.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-12-08 12:41:20 +01:00
parent bf662e5b62
commit 99ef6faf76
1 changed files with 3 additions and 3 deletions

View File

@ -339,7 +339,7 @@ static void set_config_dir(void)
} }
} }
static void init_paths( int argc, char *argv[], char *envp[] ) static void init_paths( char *argv[] )
{ {
Dl_info info; Dl_info info;
@ -350,7 +350,7 @@ static void init_paths( int argc, char *argv[], char *envp[] )
if (!(build_dir = remove_tail( dll_dir, "/dlls/ntdll" ))) if (!(build_dir = remove_tail( dll_dir, "/dlls/ntdll" )))
{ {
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) #if (defined(__linux__) && !defined(__ANDROID__)) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
bin_dir = realpath_dirname( "/proc/self/exe" ); bin_dir = realpath_dirname( "/proc/self/exe" );
#elif defined (__FreeBSD__) || defined(__DragonFly__) #elif defined (__FreeBSD__) || defined(__DragonFly__)
bin_dir = realpath_dirname( "/proc/curproc/file" ); bin_dir = realpath_dirname( "/proc/curproc/file" );
@ -1757,7 +1757,7 @@ static void check_command_line( int argc, char *argv[] )
*/ */
void __wine_main( int argc, char *argv[], char *envp[] ) void __wine_main( int argc, char *argv[], char *envp[] )
{ {
init_paths( argc, argv, envp ); init_paths( argv );
if (!getenv( "WINELOADERNOEXEC" )) /* first time around */ if (!getenv( "WINELOADERNOEXEC" )) /* first time around */
{ {