Merge "[mips64] Fix ipc syscalls"
This commit is contained in:
commit
ce4d419f7a
3 changed files with 6 additions and 3 deletions
|
@ -32,8 +32,9 @@
|
|||
#include <unistd.h>
|
||||
|
||||
int msgctl(int id, int cmd, msqid_ds* buf) {
|
||||
#if !defined(__LP64__)
|
||||
#if !defined(__LP64__) || defined(__mips__)
|
||||
// Annoyingly, the kernel requires this for 32-bit but rejects it for 64-bit.
|
||||
// Mips64 is an exception to this, it requires the flag.
|
||||
cmd |= IPC_64;
|
||||
#endif
|
||||
#if defined(SYS_msgctl)
|
||||
|
|
|
@ -33,8 +33,9 @@
|
|||
#include <unistd.h>
|
||||
|
||||
int semctl(int id, int num, int cmd, ...) {
|
||||
#if !defined(__LP64__)
|
||||
#if !defined(__LP64__) || defined(__mips__)
|
||||
// Annoyingly, the kernel requires this for 32-bit but rejects it for 64-bit.
|
||||
// Mips64 is an exception to this, it requires the flag.
|
||||
cmd |= IPC_64;
|
||||
#endif
|
||||
va_list ap;
|
||||
|
|
|
@ -45,8 +45,9 @@ void* shmat(int id, const void* address, int flags) {
|
|||
}
|
||||
|
||||
int shmctl(int id, int cmd, struct shmid_ds* buf) {
|
||||
#if !defined(__LP64__)
|
||||
#if !defined(__LP64__) || defined(__mips__)
|
||||
// Annoyingly, the kernel requires this for 32-bit but rejects it for 64-bit.
|
||||
// Mips64 is an exception to this, it requires the flag.
|
||||
cmd |= IPC_64;
|
||||
#endif
|
||||
#if defined(SYS_shmctl)
|
||||
|
|
Loading…
Reference in a new issue