chiark / gitweb /
path: make the check for unsupported name_to_handle_at symmetric
[elogind.git] / src / shared / missing.h
index 478988c8a41d3850ce59f5e9bc75644ee792228d..bea1254369ab3362ce7c5b867a6932ee90a04bb5 100644 (file)
 #include <libaudit.h>
 #endif
 
-#include "macro.h"
-
 #ifdef ARCH_MIPS
 #include <asm/sgidefs.h>
 #endif
 
+#ifdef HAVE_LINUX_BTRFS_H
+#include <linux/btrfs.h>
+#endif
+
+#include "macro.h"
+
 #ifndef RLIMIT_RTTIME
 #define RLIMIT_RTTIME 15
 #endif
@@ -631,3 +635,13 @@ static inline int setns(int fd, int nstype) {
 #ifndef CAP_AUDIT_READ
 #define CAP_AUDIT_READ 37
 #endif
+
+static inline long raw_clone(unsigned long flags, void *child_stack) {
+#if defined(__s390__) || defined(__CRIS__)
+        /* On s390 and cris the order of the first and second arguments
+         * of the raw clone() system call is reversed. */
+        return syscall(__NR_clone, child_stack, flags);
+#else
+        return syscall(__NR_clone, flags, child_stack);
+#endif
+}