Skip to content

Commit 53af5ab

Browse files
authored
Rollup merge of rust-lang#154732 - xtqqczze:GH154679, r=tgross35
fix(std): avoid AT_MINSIGSTKSZ on uclibc targets Closes rust-lang#154679 `AT_MINSIGSTKSZ` is not defined on uclibc. r? @tgross35
2 parents 325340e + b0c4b6e commit 53af5ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

library/std/src/sys/pal/unix/stack_overflow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ mod imp {
305305
}
306306

307307
/// Modern kernels on modern hardware can have dynamic signal stack sizes.
308-
#[cfg(any(target_os = "linux", target_os = "android"))]
308+
#[cfg(all(any(target_os = "linux", target_os = "android"), not(target_env = "uclibc")))]
309309
fn sigstack_size() -> usize {
310310
let dynamic_sigstksz = unsafe { libc::getauxval(libc::AT_MINSIGSTKSZ) };
311311
// If getauxval couldn't find the entry, it returns 0,
@@ -315,7 +315,7 @@ mod imp {
315315
}
316316

317317
/// Not all OS support hardware where this is needed.
318-
#[cfg(not(any(target_os = "linux", target_os = "android")))]
318+
#[cfg(not(all(any(target_os = "linux", target_os = "android"), not(target_env = "uclibc"))))]
319319
fn sigstack_size() -> usize {
320320
libc::SIGSTKSZ
321321
}

0 commit comments

Comments
 (0)