diff --git a/build.rs b/build.rs index 5d00811ab..9ec8d4ed2 100644 --- a/build.rs +++ b/build.rs @@ -184,9 +184,13 @@ fn have_gettext(target: &Target) -> Result> { /// 0.5 MiB is small enough that we'd have to drastically reduce MAX_STACK_DEPTH to less than 10, so /// we instead use a workaround to increase the main thread size. fn has_small_stack(_: &Target) -> Result> { - #[cfg(not(target_os = "macos"))] + #[cfg(not(any(target_os = "macos", target_os = "netbsd")))] return Ok(false); + // NetBSD 10 also needs this but can't find pthread_get_stacksize_np. + #[cfg(target_os = "netbsd")] + return Ok(true); + #[cfg(target_os = "macos")] { use core::ffi;