[PATCH] Fix alignment of sem_t for AArch64 ILP32

Andreas Schwab schwab@suse.de
Wed May 27 11:39:00 GMT 2015


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."



More information about the Libc-alpha mailing list