aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2025-11-08 20:25:56 +0100
committerLaytan Laats <laytanlaats@hotmail.com>2025-11-08 20:25:56 +0100
commit0b0caab1d25803cbd08e5b4c2c30074e6b823964 (patch)
treeb5a066251b61ecc673ce282b2dc7fd78d45d38ca
parent2c7b4130ebd6e6afcd352d1816f850c665a32fcc (diff)
fix pthread_attr_t size on arm64
-rw-r--r--core/sys/posix/pthread.odin10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/sys/posix/pthread.odin b/core/sys/posix/pthread.odin
index 733725e2c..e480b761c 100644
--- a/core/sys/posix/pthread.odin
+++ b/core/sys/posix/pthread.odin
@@ -632,8 +632,16 @@ when ODIN_OS == .Darwin {
pthread_t :: distinct c.ulong
+ when ODIN_ARCH == .arm64 {
+ @(private)
+ __SIZEOF_PTHREAD_ATTR_T :: 64
+ } else {
+ @(private)
+ __SIZEOF_PTHREAD_ATTR_T :: 56
+ }
+
pthread_attr_t :: struct #raw_union {
- __size: [56]c.char, // NOTE: may be smaller depending on libc or arch, but never larger.
+ __size: [__SIZEOF_PTHREAD_ATTR_T]c.char,
__align: c.long,
}