summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/bits/ipc.h
diff options
context:
space:
mode:
authorVladimir Murzin <vladimir.murzin@arm.com>2020-02-06 13:13:54 +0000
committerWaldemar Brodkorb <wbx@openadk.org>2020-02-07 14:37:15 +0100
commit28c3e6db471b00203133ca89c67f7507a9f7405d (patch)
tree6c591fe8b811ed286c98299344324dc97a1878be /libc/sysdeps/linux/common/bits/ipc.h
parentd13a57c2eb09926815550c1b263cb0fad66cde3f (diff)
common/bits: Fix ipc_perm and semid_ds definitions for 64-bit arches
It fixes: FAIL sem got 1 expected 0 failed: incorrect sem_nsems! semget(IPC_CREAT) = 0 semctl(k) = 0 sem_nsems = 0 for aarch64. Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Diffstat (limited to 'libc/sysdeps/linux/common/bits/ipc.h')
-rw-r--r--libc/sysdeps/linux/common/bits/ipc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/bits/ipc.h b/libc/sysdeps/linux/common/bits/ipc.h
index 3bd5f1b6f..ca7f58cc7 100644
--- a/libc/sysdeps/linux/common/bits/ipc.h
+++ b/libc/sysdeps/linux/common/bits/ipc.h
@@ -20,6 +20,7 @@
#endif
#include <bits/types.h>
+#include <bits/wordsize.h>
/* Mode bits for `msgget', `semget', and `shmget'. */
#define IPC_CREAT 01000 /* Create key if key does not exist. */
@@ -46,8 +47,12 @@ struct ipc_perm
__gid_t gid; /* Owner's group ID. */
__uid_t cuid; /* Creator's user ID. */
__gid_t cgid; /* Creator's group ID. */
+#if __WORDSIZE == 64
+ unsigned int mode;
+#else
unsigned short int mode; /* Read/write permission. */
unsigned short int __pad1;
+#endif
unsigned short int __seq; /* Sequence number. */
unsigned short int __pad2;
unsigned long int __unused1;