diff --git a/library/std/src/sys/pal/unix/stack_overflow.rs b/library/std/src/sys/pal/unix/stack_overflow.rs index ac0858e1de876..5648b5f2798a9 100644 --- a/library/std/src/sys/pal/unix/stack_overflow.rs +++ b/library/std/src/sys/pal/unix/stack_overflow.rs @@ -265,7 +265,10 @@ mod imp { /// Modern kernels on modern hardware can have dynamic signal stack sizes. #[cfg(any(target_os = "linux", target_os = "android"))] fn sigstack_size() -> usize { - // FIXME: reuse const from libc when available? + #[cfg(target_os = "linux")] + const AT_MINSIGSTKSZ: crate::ffi::c_ulong = libc::AT_MINSIGSTKSZ; + // FIXME: reuse const from libc when available ? + #[cfg(target_os = "android")] const AT_MINSIGSTKSZ: crate::ffi::c_ulong = 51; let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) }; // If getauxval couldn't find the entry, it returns 0,