summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-11 20:42:08 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-11 20:42:08 -0400
commitc88788f5513422c37200a941c489e575942397e4 (patch)
treedd8ed691857c458036ac82fdf4c1fbdcd0b9b69f
parent3cf374393bba620c4ef1ef342f4e9178a2f25ceb (diff)
fix call to va_start()
-rw-r--r--src/ulimit/ulimit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ulimit/ulimit.c b/src/ulimit/ulimit.c
index c326640a..1588ea3a 100644
--- a/src/ulimit/ulimit.c
+++ b/src/ulimit/ulimit.c
@@ -1,6 +1,8 @@
#include <ulimit.h>
#include "sys/resource.h"
#include "stdarg.h"
+#include "stddef.h"
+#include "errno.h"
long ulimit(int cmd, ...)
{
@@ -13,7 +15,7 @@ long ulimit(int cmd, ...)
return -1;
} else if (cmd == UL_SETFSIZE) {
va_list ap;
- va_start(cmd);
+ va_start(ap, cmd);
rl.rlim_cur = va_arg(ap, rlim_t) * 512;
va_end(ap);
if (setrlimit(RLIMIT_FSIZE, NULL) == 0) {