Răsfoiți Sursa

fix IPC_64 in msgctl too

Rich Felker 12 ani în urmă
părinte
comite
cccc13221d
3 a modificat fișierele cu 4 adăugiri și 6 ștergeri
  1. 2 0
      arch/x86_64/bits/ipc.h
  2. 2 2
      src/ipc/msgctl.c
  3. 0 4
      src/ipc/semctl.c

+ 2 - 0
arch/x86_64/bits/ipc.h

@@ -10,3 +10,5 @@ struct ipc_perm
 	long __pad1;
 	long __pad2;
 };
+
+#define IPC_64 0

+ 2 - 2
src/ipc/msgctl.c

@@ -5,8 +5,8 @@
 int msgctl(int q, int cmd, struct msqid_ds *buf)
 {
 #ifdef SYS_msgctl
-	return syscall(SYS_msgctl, q, cmd | 0x100, buf);
+	return syscall(SYS_msgctl, q, cmd | IPC_64, buf);
 #else
-	return syscall(SYS_ipc, IPCOP_msgctl, q, cmd | 0x100, 0, buf, 0);
+	return syscall(SYS_ipc, IPCOP_msgctl, q, cmd | IPC_64, 0, buf, 0);
 #endif
 }

+ 0 - 4
src/ipc/semctl.c

@@ -3,10 +3,6 @@
 #include "syscall.h"
 #include "ipc.h"
 
-#ifndef IPC_64
-#define IPC_64 0
-#endif
-
 int semctl(int id, int num, int cmd, ...)
 {
 	long arg;