1
Fork 0

Only test pthread_getname_np on linux-gnu

This commit is contained in:
Josh Stone 2022-10-23 11:53:39 -07:00
parent 12e45846eb
commit 15cfeb33b0

View file

@ -37,7 +37,13 @@ fn test_named_thread() {
.unwrap();
}
#[cfg(any(target_os = "linux", target_os = "macos", target_os = "ios", target_os = "watchos"))]
#[cfg(any(
// Note: musl didn't add pthread_getname_np until 1.2.3
all(target_os = "linux", target_env = "gnu"),
target_os = "macos",
target_os = "ios",
target_os = "watchos"
))]
#[test]
fn test_named_thread_truncation() {
use crate::ffi::CStr;