mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 11:12:27 +00:00
Fix some todos
This commit is contained in:
parent
9d372f48dd
commit
9cc4f33c76
13 changed files with 261 additions and 139 deletions
|
@ -19,11 +19,13 @@
|
|||
#include "libc/assert.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/rlimit.internal.h"
|
||||
#include "libc/calls/syscall-sysv.internal.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/intrin/asan.internal.h"
|
||||
#include "libc/intrin/describeflags.internal.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/runtime/syslib.internal.h"
|
||||
#include "libc/sysv/consts/rlimit.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
|
@ -79,6 +81,8 @@ int setrlimit(int resource, const struct rlimit *rlim) {
|
|||
rc = einval();
|
||||
} else if (!rlim || (IsAsan() && !__asan_is_valid(rlim, sizeof(*rlim)))) {
|
||||
rc = efault();
|
||||
} else if (IsXnuSilicon()) {
|
||||
rc = _sysret(__syslib->__setrlimit(resource, rlim));
|
||||
} else if (!IsWindows()) {
|
||||
rc = sys_setrlimit(resource, rlim);
|
||||
if (IsXnu() && !rc && resource == RLIMIT_AS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue