diff options
| -rw-r--r-- | core/sys/posix/pthread.odin | 10 |
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, } |