diff --git a/libc-test/build.rs b/libc-test/build.rs
index b4eb70c68514d0ae97426e43c114a82ca05224e7..4ee2ca6212cccb2758d47b6f66df7bc979cc17f6 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -200,7 +200,7 @@ fn main() {
             "SIG_IGN" => true, // sighandler_t weirdness
 
             // types on musl are defined a little differently
-            n if musl && n.contains("PTHREAD") => true,
+            n if musl && n.contains("__SIZEOF_PTHREAD") => true,
 
             _ => false,
         }
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 6606b41c9c6e0f2489fe2e8e83e7df7b4b0a6def..e5b529e1180dac65436277045472f3776b51ecd0 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -221,7 +221,9 @@ extern {
 }
 
 cfg_if! {
-    if #[cfg(any(target_arch = "arm", target_arch = "x86",
+    if #[cfg(any(target_env = "musl"))] {
+        pub const PTHREAD_STACK_MIN: ::size_t = 2048;
+    } else if #[cfg(any(target_arch = "arm", target_arch = "x86",
                  target_arch = "x86_64"))] {
         pub const PTHREAD_STACK_MIN: ::size_t = 16384;
     } else {