From: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Branch: master
tst-pthread-barrier.cc: account for different size of pthread_barrierattr_t on aarch64
Signed-off-by: Waldemar Kozaczuk <
jwkoz...@gmail.com>
---
diff --git a/tests/tst-pthread-barrier.cc b/tests/tst-pthread-barrier.cc
--- a/tests/tst-pthread-barrier.cc
+++ b/tests/tst-pthread-barrier.cc
@@ -67,7 +67,15 @@ int main(void)
printf("Sizeof pthread_barrier_t : %ld\n", sizeof(barrier));
report("sizeof pthread_barrier_t is 32 bytes\n", sizeof(barrier) == 32);
printf("Sizeof pthread_barrierattr_t: %ld\n", sizeof(attr));
+#ifdef __x86_64__
report("sizeof pthread_barrierattr_t is 4 bytes\n", sizeof(attr) == 4);
+#else
+#ifdef __OSV__
+ report("sizeof pthread_barrierattr_t is 4 bytes\n", sizeof(attr) == 4);
+#else
+ report("sizeof pthread_barrierattr_t is 8 bytes\n", sizeof(attr) == 8);
+#endif
+#endif
#ifdef __OSV__
// Try an invalid initialization (-1 or 0 or a null pthread_barrier_t*)