musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--src/conf/sysconf.c 6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf/sysconf.c b/src/conf/sysconf.c
index e225c3dd..9ac52a10 100644
--- a/src/conf/sysconf.c
+++ b/src/conf/sysconf.c
@@ -228,9 +228,9 @@ long sysconf(int name)
} else if (values[name] >= -1) {
return values[name];
} else if (values[name] < -256) {
- long lim[2];
- __syscall(SYS_getrlimit, values[name]&16383, lim);
- return lim[0] < 0 ? LONG_MAX : lim[0];
+ struct rlimit lim;
+ getrlimit(values[name]&16383, &lim);
+ return lim.rlim_cur > LONG_MAX ? LONG_MAX : lim.rlim_cur;
}
switch ((unsigned char)values[name]) {
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月06日 06:16:50 +0000

AltStyle によって変換されたページ (->オリジナル) /