1
Fork 0
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:
Andreas Kling 2019-02-23 17:24:50 +01:00
parent d7753c7c8d
commit a7a456002e
14 changed files with 110 additions and 45 deletions

View file

@ -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;