This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix alignment of sem_t for AArch64 ILP32
- From: Andreas Schwab <schwab at suse dot de>
- To: libc-alpha at sourceware dot org
- Date: Wed, 27 May 2015 13:00:28 +0200
- Subject: [PATCH] Fix alignment of sem_t for AArch64 ILP32
- Authentication-results: sourceware.org; auth=none
sem_t must have the same alignment as struct new_sem.
Andreas.
* sysdeps/aarch64/nptl/bits/semaphore.h (sem_t) [!__LP64__]: Use
long long for __align.
---
sysdeps/aarch64/nptl/bits/semaphore.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sysdeps/aarch64/nptl/bits/semaphore.h b/sysdeps/aarch64/nptl/bits/semaphore.h
index 047dd4e..d9f4ab6 100644
--- a/sysdeps/aarch64/nptl/bits/semaphore.h
+++ b/sysdeps/aarch64/nptl/bits/semaphore.h
@@ -31,5 +31,9 @@
typedef union
{
char __size[__SIZEOF_SEM_T];
+#ifdef __LP64__
long int __align;
+#else
+ long long int __align;
+#endif
} sem_t;
--
2.4.2
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."