Skip to content

Commit 3a572fd

Browse files
committed
Be more selective about skipped pthread on musl tests
Fixup the value of PTHREAD_STACK_MIN as well
1 parent 1effc23 commit 3a572fd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

libc-test/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ fn main() {
200200
"SIG_IGN" => true, // sighandler_t weirdness
201201

202202
// types on musl are defined a little differently
203-
n if musl && n.contains("PTHREAD") => true,
203+
n if musl && n.contains("__SIZEOF_PTHREAD") => true,
204204

205205
_ => false,
206206
}

src/unix/notbsd/linux/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ extern {
221221
}
222222

223223
cfg_if! {
224-
if #[cfg(any(target_arch = "arm", target_arch = "x86",
224+
if #[cfg(any(target_env = "musl"))] {
225+
pub const PTHREAD_STACK_MIN: ::size_t = 2048;
226+
} else if #[cfg(any(target_arch = "arm", target_arch = "x86",
225227
target_arch = "x86_64"))] {
226228
pub const PTHREAD_STACK_MIN: ::size_t = 16384;
227229
} else {

0 commit comments

Comments
 (0)