From 974320d09fbd1fae79da537383c2144ed9aa4967 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sun, 2 Jun 2019 21:04:48 -0600 Subject: Fix test_pthread_self on musl On musl, pthread_t is a pointer type. --- test/sys/test_pthread.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/sys/test_pthread.rs b/test/sys/test_pthread.rs index a4f02772..7e6baea0 100644 --- a/test/sys/test_pthread.rs +++ b/test/sys/test_pthread.rs @@ -1,5 +1,14 @@ use nix::sys::pthread::*; +use std::ptr; +#[cfg(target_env = "musl")] +#[test] +fn test_pthread_self() { + let tid = pthread_self(); + assert!(tid != ptr::null_mut()); +} + +#[cfg(not(target_env = "musl"))] #[test] fn test_pthread_self() { let tid = pthread_self(); -- cgit v1.2.3