summaryrefslogtreecommitdiff
path: root/src/shared/missing.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-05 02:29:58 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-05 02:31:09 +0100
commit517d56b1d0f67dcf76710bc1e17b05518b8cabe6 (patch)
tree1d1baa6af8fb323fc0c2eb02a1ae59dbeba2d049 /src/shared/missing.h
parenta049d1a9723b6608e45bf8f1a64dab5761dee555 (diff)
missing: if RLIMIT_RTTIME is not defined by the libc, then we need a new define for the max number of rlimits, too
Diffstat (limited to 'src/shared/missing.h')
-rw-r--r--src/shared/missing.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/missing.h b/src/shared/missing.h
index 06c69dac8e..4e63fb9ac4 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -47,6 +47,9 @@
#define RLIMIT_RTTIME 15
#endif
+/* If RLIMIT_RTTIME is not defined, then we cannot use RLIMIT_NLIMITS as is */
+#define _RLIMIT_MAX (RLIMIT_RTTIME+1 > RLIMIT_NLIMITS ? RLIMIT_RTTIME+1 : RLIMIT_NLIMITS)
+
#ifndef F_LINUX_SPECIFIC_BASE
#define F_LINUX_SPECIFIC_BASE 1024
#endif