Skip to content

Commit 3fc0015

Browse files
committed
fix values of constants on macOS aarch64
1 parent bdc755b commit 3fc0015

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,6 +1907,9 @@ pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 2;
19071907
pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
19081908
pub const PTHREAD_CREATE_JOINABLE: ::c_int = 1;
19091909
pub const PTHREAD_CREATE_DETACHED: ::c_int = 2;
1910+
#[cfg(target_arch = "aarch64")]
1911+
pub const PTHREAD_STACK_MIN: ::size_t = 16384;
1912+
#[cfg(not(target_arch = "aarch64"))]
19101913
pub const PTHREAD_STACK_MIN: ::size_t = 8192;
19111914

19121915
pub const RLIMIT_CPU: ::c_int = 0;
@@ -3129,6 +3132,9 @@ pub const SETALL: ::c_int = 9;
31293132
// sys/shm.h
31303133
pub const SHM_RDONLY: ::c_int = 0x1000;
31313134
pub const SHM_RND: ::c_int = 0x2000;
3135+
#[cfg(target_arch = "aarch64")]
3136+
pub const SHMLBA: ::c_int = 16 * 1024;
3137+
#[cfg(not(target_arch = "aarch64"))]
31323138
pub const SHMLBA: ::c_int = 4096;
31333139
pub const SHM_R: ::c_int = IPC_R;
31343140
pub const SHM_W: ::c_int = IPC_W;

0 commit comments

Comments
 (0)