summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/sys/_types.h4
-rw-r--r--sys/sys/resource.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/sys/_types.h b/sys/sys/_types.h
index c77f683fc53e..3047e985337b 100644
--- a/sys/sys/_types.h
+++ b/sys/sys/_types.h
@@ -49,7 +49,9 @@ typedef int __nl_item;
typedef __uint16_t __nlink_t; /* link count */
typedef __int64_t __off_t; /* file offset */
typedef __int32_t __pid_t; /* process [group] */
-typedef __int64_t __rlim_t; /* resource limit (XXX not unsigned) */
+typedef __int64_t __rlim_t; /* resource limit - intentionally */
+ /* signed, because of legacy code */
+ /* that uses -1 for RLIM_INFINITY */
typedef __uint8_t __sa_family_t;
typedef __uint32_t __socklen_t;
typedef long __suseconds_t; /* microseconds (signed) */
diff --git a/sys/sys/resource.h b/sys/sys/resource.h
index dbe99cf94322..f9e36ee184d3 100644
--- a/sys/sys/resource.h
+++ b/sys/sys/resource.h
@@ -98,7 +98,7 @@ struct rusage {
#define RLIM_NLIMITS 11 /* number of resource limits */
-#define RLIM_INFINITY ((rlim_t)(((u_quad_t)1 << 63) - 1))
+#define RLIM_INFINITY ((rlim_t)INT64_MAX)
/* XXX Missing: RLIM_SAVED_MAX, RLIM_SAVED_CUR */