6 #if __BYTE_ORDER != __BIG_ENDIAN
7 #undef SYSCALL_IPC_BROKEN_MODE
10 int msgctl(int q
, int cmd
, struct msqid_ds
*buf
)
12 #ifdef SYSCALL_IPC_BROKEN_MODE
16 tmp
.msg_perm
.mode
*= 0x10000U
;
21 int r
= __syscall(SYS_msgctl
, q
, cmd
| IPC_64
, buf
);
23 int r
= __syscall(SYS_ipc
, IPCOP_msgctl
, q
, cmd
| IPC_64
, 0, buf
, 0);
25 #ifdef SYSCALL_IPC_BROKEN_MODE
26 if (r
>= 0) switch (cmd
) {
30 buf
->msg_perm
.mode
>>= 16;
33 return __syscall_ret(r
);