mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Unbreak MODE=tiny build
This change also fixes a minor issue with pledge() polyfill introduced the last change setting errno appropriately. Fixes #396
This commit is contained in:
parent
47b3274665
commit
80c4533303
2 changed files with 8 additions and 2 deletions
|
@ -112,6 +112,7 @@ o/$(MODE)/libc/calls/execlp.o \
|
|||
o/$(MODE)/libc/calls/copyfile.o \
|
||||
o/$(MODE)/libc/calls/execve-nt.o \
|
||||
o/$(MODE)/libc/calls/execve-sysv.o \
|
||||
o/$(MODE)/libc/calls/symlinkat-nt.o \
|
||||
o/$(MODE)/libc/calls/readlinkat-nt.o \
|
||||
o/$(MODE)/libc/calls/describeopenflags.greg.o \
|
||||
o/$(MODE)/libc/calls/mkntenvblock.o: \
|
||||
|
|
|
@ -322,9 +322,14 @@ static int sys_pledge_linux(const char *promises, const char *execpromises) {
|
|||
AppendFilter(&f, kFilterStart, ARRAYLEN(kFilterStart)) &&
|
||||
AppendPledge(&f, kPledgeLinuxDefault)) {
|
||||
for (ok = true; (tok = strtok_r(start, " \t\r\n", &state)); start = 0) {
|
||||
if (!(pledge = FindPledge(kPledgeLinux, tok)) ||
|
||||
!AppendPledge(&f, pledge)) {
|
||||
if (!(pledge = FindPledge(kPledgeLinux, tok))) {
|
||||
ok = false;
|
||||
rc = einval();
|
||||
break;
|
||||
}
|
||||
if (!AppendPledge(&f, pledge)) {
|
||||
ok = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ok && AppendFilter(&f, kFilterEnd, ARRAYLEN(kFilterEnd)) &&
|
||||
|
|
Loading…
Reference in a new issue