summaryrefslogtreecommitdiff
path: root/bin/ksh/c_ulimit.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ksh/c_ulimit.c')
-rw-r--r--bin/ksh/c_ulimit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/ksh/c_ulimit.c b/bin/ksh/c_ulimit.c
index 2dd36672ac8..1ba64f46707 100644
--- a/bin/ksh/c_ulimit.c
+++ b/bin/ksh/c_ulimit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: c_ulimit.c,v 1.27 2018/03/15 16:51:29 anton Exp $ */
+/* $OpenBSD: c_ulimit.c,v 1.28 2018/04/09 17:53:36 tobias Exp $ */
/*
ulimit -- handle "ulimit" builtin
@@ -22,6 +22,7 @@
#include <ctype.h>
#include <errno.h>
+#include <inttypes.h>
#include <string.h>
#include "sh.h"
@@ -139,7 +140,7 @@ set_ulimit(const struct limits *l, const char *v, int how)
if (strcmp(v, "unlimited") == 0)
val = RLIM_INFINITY;
else {
- long rval;
+ int64_t rval;
if (!evaluate(v, &rval, KSH_RETURN_ERROR, false))
return 1;
@@ -187,6 +188,6 @@ print_ulimit(const struct limits *l, int how)
shprintf("unlimited\n");
else {
val /= l->factor;
- shprintf("%ld\n", (long) val);
+ shprintf("%" PRIi64 "\n", (int64_t) val);
}
}