summaryrefslogtreecommitdiff
path: root/src/shared/missing.h
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-08-14 11:28:47 -0400
committerAnthony G. Basile <blueness@gentoo.org>2014-08-14 11:28:47 -0400
commit28744043fbaca39dfc9fd1666a8557fd6d8a690f (patch)
treef0cf30fe98f3e7e535be23c3954973ef02c58e49 /src/shared/missing.h
parent819fb6029dde2af3acf23b0fa25c1851b26ce102 (diff)
src/shared: import many code cleanups from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
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 471a81120c..3c758956c6 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -41,6 +41,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 BTRFS_IOCTL_MAGIC
#define BTRFS_IOCTL_MAGIC 0x94
#endif