Skip to content

Commit 15cfeb3

Browse files
committed
Only test pthread_getname_np on linux-gnu
1 parent 12e4584 commit 15cfeb3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

library/std/src/thread/tests.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ fn test_named_thread() {
3737
.unwrap();
3838
}
3939

40-
#[cfg(any(target_os = "linux", target_os = "macos", target_os = "ios", target_os = "watchos"))]
40+
#[cfg(any(
41+
// Note: musl didn't add pthread_getname_np until 1.2.3
42+
all(target_os = "linux", target_env = "gnu"),
43+
target_os = "macos",
44+
target_os = "ios",
45+
target_os = "watchos"
46+
))]
4147
#[test]
4248
fn test_named_thread_truncation() {
4349
use crate::ffi::CStr;

0 commit comments

Comments
 (0)