@@ -2572,7 +2572,6 @@ EXPORT int32_t my_execvp(x86emu_t* emu, const char* path, char* const argv[])
25722572 // fullpath is gone, so the search will only be on PATH, not on BOX86_PATH (is that an issue?)
25732573 return execvp (path , argv );
25742574}
2575-
25762575// execvpe should use PATH to search for the program first
25772576EXPORT int32_t my_execvpe (x86emu_t * emu , const char * path , char * const argv [], char * const envv [])
25782577{
@@ -2599,22 +2598,35 @@ EXPORT int32_t my_execvpe(x86emu_t* emu, const char* path, char* const argv[], c
25992598 if (self ) newargv [1 ] = emu -> context -> fullpath ;
26002599 if (script ) newargv [2 ] = emu -> context -> bashpath ;
26012600 printf_log (LOG_DEBUG , " => execvp(\"%s\", %p [\"%s\", \"%s\"...:%d])\n" , newargv [0 ], newargv , newargv [1 ], i ?newargv [2 ]:"" , i );
2601+ #ifdef PANDORA
2602+ int ret = execve (newargv [0 ], newargv , envv );
2603+ #else
26022604 int ret = execvpe (newargv [0 ], newargv , envv );
2605+ #endif
26032606 box_free (fullpath );
26042607 return ret ;
26052608 }
2609+ #ifndef PANDORA
26062610 box_free (fullpath );
2611+ #endif
26072612 if ((!strcmp (path + strlen (path ) - strlen ("/uname" ), "/uname" ) || !strcmp (path , "uname" ))
26082613 && argv [1 ] && (!strcmp (argv [1 ], "-m" ) || !strcmp (argv [1 ], "-p" ) || !strcmp (argv [1 ], "-i" ))
26092614 && !argv [2 ]) {
26102615 // uname -m is redirected to box86 -m
26112616 path = my_context -> box86path ;
26122617 char * argv2 [3 ] = { my_context -> box86path , argv [1 ], NULL };
2618+ #ifdef PANDORA
2619+ return execve (fullpath , argv2 , envv );
2620+ #else
26132621 return execvpe (path , argv2 , envv );
2622+ #endif
26142623 }
2615-
2624+ #ifdef PANDORA
2625+ return execve (fullpath , argv , envv );
2626+ #else
26162627 // fullpath is gone, so the search will only be on PATH, not on BOX86_PATH (is that an issue?)
26172628 return execvpe (path , argv , envv );
2629+ #endif
26182630}
26192631
26202632// execvp should use PATH to search for the program first
0 commit comments