chiark / gitweb /
missing: define LO_FLAGS_PARTSCAN if it is missing
[elogind.git] / src / shared / missing.h
index 06c69dac8efff4562b16f2079cbd01646c19ded9..ce4a6e36f45ed031af0740305f695d85db8756f4 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
@@ -362,3 +365,7 @@ static inline int setns(int fd, int nstype) {
         return syscall(__NR_setns, fd, nstype);
 }
 #endif
+
+#if !HAVE_DECL_LO_FLAGS_PARTSCAN
+#define LO_FLAGS_PARTSCAN 8
+#endif