From 355a93c3d6ed5afbb6c1307b5b3dcc9e3e0d57c6 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 9 Jun 2024 21:28:03 +0100 Subject: [PATCH] std::unix::stack_overflow::drop_handler addressing todo through libc update --- library/std/src/sys/pal/unix/stack_overflow.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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,