Get all tests passing on NetBSD
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user