chiark / gitweb /
missing: if RLIMIT_RTTIME is not defined by the libc, then we need a new define for...
[elogind.git] / src / shared / missing.h
index 06c69dac8efff4562b16f2079cbd01646c19ded9..4e63fb9ac450a627adac1eb8e2788770036c2b80 100644 (file)
@@ -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