Merge "[mips64] Fix ipc syscalls"

This commit is contained in:
Treehugger Robot 2016-09-09 17:19:54 +00:00 committed by Gerrit Code Review
commit ce4d419f7a
3 changed files with 6 additions and 3 deletions

View file

@ -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)

View file

@ -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;

View file

@ -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)