]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
missing: move syscall related definitions to missing_syscall.h
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Dec 2018 05:32:41 +0000 (06:32 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Dec 2018 12:25:24 +0000 (13:25 +0100)
src/basic/missing.h
src/basic/missing_syscall.h

index f7ab2859a49895804ea8b04ba52c739405664f9a..651913102566a06ea0a5dcbae2957fa2d509f083 100644 (file)
 #include <sys/resource.h>
 #include <sys/socket.h>
 #include <sys/syscall.h>
-#include <unistd.h>
 
 #if HAVE_AUDIT
 #include <libaudit.h>
 #endif
 
-#ifdef ARCH_MIPS
-#include <asm/sgidefs.h>
-#endif
-
 #if HAVE_LINUX_VM_SOCKETS_H
 #include <linux/vm_sockets.h>
 #else
@@ -250,10 +245,6 @@ struct sockaddr_vm {
 #define RENAME_NOREPLACE (1 << 0)
 #endif
 
-#ifndef KCMP_FILE
-#define KCMP_FILE 0
-#endif
-
 #ifndef SOL_ALG
 #define SOL_ALG 279
 #endif
index b009ea5bfa6904b65deedbdb0697a1cc617eab7d..d5d4b26acb3776a188329e6a863a13a7ad759975 100644 (file)
@@ -6,10 +6,20 @@
 #include <fcntl.h>
 #include <sys/syscall.h>
 #include <sys/types.h>
+#include <unistd.h>
+
+#ifdef ARCH_MIPS
+#include <asm/sgidefs.h>
+#endif
 
 #include "missing_keyctl.h"
 #include "missing_stat.h"
 
+/* linux/kcmp.h */
+#ifndef KCMP_FILE /* 3f4994cfc15f38a3159c6e3a4b3ab2e1481a6b02 (3.19) */
+#define KCMP_FILE 0
+#endif
+
 #if !HAVE_PIVOT_ROOT
 static inline int missing_pivot_root(const char *new_root, const char *put_old) {
         return syscall(__NR_pivot_root, new_root, put_old);
@@ -257,7 +267,7 @@ static inline int missing_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long i
 /* ======================================================================= */
 
 #if !HAVE_KEYCTL
-static inline long missing_keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4,unsigned long arg5) {
+static inline long missing_keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5) {
 #  ifdef __NR_keyctl
         return syscall(__NR_keyctl, cmd, arg2, arg3, arg4, arg5);
 #  else