about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-01-29 20:19:39 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-01-29 20:19:39 +0530
commit6550fe704e4a62738ab1de9831cd86f6d8a5256f (patch)
tree3f35bd57062115fd2c4dad59394a18c88cf6da45
parent97549c4f1608a12c6571bef16c4c82899df9d69f (diff)
parentacaf151ade7befa92eee8a9e0c3d03695194292b (diff)
downloadrust-6550fe704e4a62738ab1de9831cd86f6d8a5256f.tar.gz
rust-6550fe704e4a62738ab1de9831cd86f6d8a5256f.zip
Rollup merge of #31275 - alexcrichton:fix-rumprun, r=brson
Looks like the rumprun build has bitrotted over time, so this includes some libc
fixes and some various libstd fixes which gets it back to bootstrapping.
m---------src/liblibc0
-rw-r--r--src/libstd/sys/unix/thread.rs13
2 files changed, 9 insertions, 4 deletions
diff --git a/src/liblibc b/src/liblibc
-Subproject af77843345ec6fc7e51113bfd692138d89024bc
+Subproject 91ff43c736de664f8d3cd351e148c09cdea6731
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index 9e28cf06d61..0faa1465c32 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -15,7 +15,6 @@ use cmp;
 #[cfg(not(target_env = "newlib"))]
 use ffi::CString;
 use io;
-use libc::PTHREAD_STACK_MIN;
 use libc;
 use mem;
 use ptr;
@@ -339,14 +338,20 @@ fn min_stack_size(attr: *const libc::pthread_attr_t) -> usize {
     });
 
     match unsafe { __pthread_get_minstack } {
-        None => PTHREAD_STACK_MIN as usize,
+        None => libc::PTHREAD_STACK_MIN as usize,
         Some(f) => unsafe { f(attr) as usize },
     }
 }
 
 // No point in looking up __pthread_get_minstack() on non-glibc
 // platforms.
-#[cfg(not(target_os = "linux"))]
+#[cfg(all(not(target_os = "linux"),
+          not(target_os = "netbsd")))]
+fn min_stack_size(_: *const libc::pthread_attr_t) -> usize {
+    libc::PTHREAD_STACK_MIN as usize
+}
+
+#[cfg(target_os = "netbsd")]
 fn min_stack_size(_: *const libc::pthread_attr_t) -> usize {
-    PTHREAD_STACK_MIN as usize
+    2048 // just a guess
 }