mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:37:46 +00:00
LibC: Enough compat work to make binutils-2.32 build and run.
This commit is contained in:
parent
d7753c7c8d
commit
a7a456002e
14 changed files with 110 additions and 45 deletions
|
@ -263,10 +263,20 @@ static int try_exec(const char* path, char** argv)
|
|||
int ret = execve(path, argv, environ);
|
||||
assert(ret < 0);
|
||||
|
||||
{
|
||||
const char* search_path = "/bin";
|
||||
char pathbuf[128];
|
||||
sprintf(pathbuf, "%s/%s", search_path, argv[0]);
|
||||
ret = execve(pathbuf, argv, environ);
|
||||
assert(ret < 0);
|
||||
}
|
||||
|
||||
{
|
||||
const char* search_path = "/usr/bin";
|
||||
char pathbuf[128];
|
||||
sprintf(pathbuf, "%s/%s", search_path, argv[0]);
|
||||
ret = execve(pathbuf, argv, environ);
|
||||
}
|
||||
if (ret == -1)
|
||||
return -1;
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue