mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-08 20:28:30 +00:00
Get all tests passing on NetBSD
This commit is contained in:
parent
23ae9dfceb
commit
b2cd58a322
41 changed files with 202 additions and 655 deletions
|
@ -32,9 +32,11 @@ int sys_execve(const char *prog, char *const argv[], char *const envp[]) {
|
|||
for (i = 0; argv[i];) ++i;
|
||||
shargs = alloca((i + 2) * sizeof(char *));
|
||||
memcpy(shargs + 2, argv + 1, i * sizeof(char *));
|
||||
shargs[0] = !IsFreebsd() ? _PATH_BSHELL
|
||||
: firstnonnull(commandv("bash", alloca(PATH_MAX)),
|
||||
_PATH_BSHELL);
|
||||
if (IsFreebsd() || IsNetbsd()) {
|
||||
shargs[0] = firstnonnull(commandv("bash", alloca(PATH_MAX)), _PATH_BSHELL);
|
||||
} else {
|
||||
shargs[0] = _PATH_BSHELL;
|
||||
}
|
||||
shargs[1] = prog;
|
||||
return __sys_execve(shargs[0], shargs, envp);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue