about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@cavium.com>2017-08-31 16:49:10 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2019-08-01 10:06:03 +0100
commit09358228d1830a3b31f79a9948b36f7fe375244b (patch)
tree4f8b46ca465b072980851aed9b43218706441c22
parentd051217dbd8a8a99568a104265f2d8ade8b969e9 (diff)
downloadglibc-09358228d1830a3b31f79a9948b36f7fe375244b.tar.gz
glibc-09358228d1830a3b31f79a9948b36f7fe375244b.tar.xz
glibc-09358228d1830a3b31f79a9948b36f7fe375244b.zip
aarch64: Fix ipc_perm definition for ILP32
Here is another aarch64 ILP32 patch.  The mode field in ipc_perm in ILP32
should be a 16 bit field, not a 32 bit one.  This was out-of-sync with what the
kernel had.  This was causing sysvipc/test-sysvsem to fail in ILP32 mode.

2017-09-01  Yury Norov  <ynorov@caviumnetworks.com>
	    Steve Ellcey  <sellcey@cavium.com>

	* sysdeps/unix/sysv/linux/aarch64/bits/ipc.h (ipc_perm):
	Ifdef and pad the mode field for ILP32.
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/bits/ipc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/ipc.h b/sysdeps/unix/sysv/linux/aarch64/bits/ipc.h
index b91377402c..a9f5a6b764 100644
--- a/sysdeps/unix/sysv/linux/aarch64/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/aarch64/bits/ipc.h
@@ -46,7 +46,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.  */
+#ifdef __LP64__
     unsigned int mode;			/* Read/write permission.  */
+#else
+    unsigned short int mode;		/* Read/write permission.  */
+    unsigned short int __pad0;
+#endif
     unsigned short int __seq;		/* Sequence number.  */
     unsigned short int __pad1;
     __syscall_ulong_t __glibc_reserved1;