Browse Source

mips32: Define __IPC_64 according to kernel version

In later kernel versions, IPC_64 is no longer required in the *ctl
function, so it is defined as 0.
yliu 1 month ago
parent
commit
133a547b54
1 changed files with 8 additions and 1 deletions
  1. 8 1
      libc/misc/sysvipc/ipc.h

+ 8 - 1
libc/misc/sysvipc/ipc.h

@@ -1,12 +1,19 @@
 #ifndef IPC_H
 #define IPC_H
 #include <syscall.h>
+#include <bits/kernel-features.h>
 #include <bits/wordsize.h>
 
 #ifndef __ARCH_HAS_DEPRECATED_SYSCALLS__
 #  define __IPC_64	0x0
+#elif defined __mips__
+# if __LINUX_KERNEL_VERSION < 0x050100
+#  define __IPC_64      0x100
+# else
+#  define __IPC_64      0x0
+# endif
 #else
-# if __WORDSIZE == 32 || defined __alpha__ || defined __mips__
+# if __WORDSIZE == 32 || defined __alpha__
 #  define __IPC_64	0x100
 # else
 #  define __IPC_64	0x0