summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-10-30 09:23:30 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-10-30 09:23:30 -0700
commit171b05b53b9612a89544419c18156f345422202b (patch)
tree6018dba558c2cd9815af33db3739ee44e01a14cf
parent1effc23b90d9c3994fc88d46fef3938ee33f0cce (diff)
parent3a572fda25502e2ecf691148ff9f5190ba32f893 (diff)
downloadrust-libc-171b05b53b9612a89544419c18156f345422202b.tar.gz
Merge pull request #22 from alexcrichton/musl-pthread
Be more selective about skipped pthread on musl tests
-rw-r--r--libc-test/build.rs2
-rw-r--r--src/unix/notbsd/linux/mod.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index b4eb70c685..4ee2ca6212 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 6606b41c9c..e5b529e118 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 {