Skip to content

Commit 6550fe7

Browse files
committed
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.
2 parents 97549c4 + acaf151 commit 6550fe7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/liblibc

src/libstd/sys/unix/thread.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use cmp;
1515
#[cfg(not(target_env = "newlib"))]
1616
use ffi::CString;
1717
use io;
18-
use libc::PTHREAD_STACK_MIN;
1918
use libc;
2019
use mem;
2120
use ptr;
@@ -339,14 +338,20 @@ fn min_stack_size(attr: *const libc::pthread_attr_t) -> usize {
339338
});
340339

341340
match unsafe { __pthread_get_minstack } {
342-
None => PTHREAD_STACK_MIN as usize,
341+
None => libc::PTHREAD_STACK_MIN as usize,
343342
Some(f) => unsafe { f(attr) as usize },
344343
}
345344
}
346345

347346
// No point in looking up __pthread_get_minstack() on non-glibc
348347
// platforms.
349-
#[cfg(not(target_os = "linux"))]
348+
#[cfg(all(not(target_os = "linux"),
349+
not(target_os = "netbsd")))]
350+
fn min_stack_size(_: *const libc::pthread_attr_t) -> usize {
351+
libc::PTHREAD_STACK_MIN as usize
352+
}
353+
354+
#[cfg(target_os = "netbsd")]
350355
fn min_stack_size(_: *const libc::pthread_attr_t) -> usize {
351-
PTHREAD_STACK_MIN as usize
356+
2048 // just a guess
352357
}

0 commit comments

Comments
 (0)