about summary refs log tree commit diff
path: root/library/std/src/sys/pal/unix/stack_overflow.rs
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-10-18 14:52:25 +0100
committerGitHub <noreply@github.com>2024-10-18 14:52:25 +0100
commit39af44dae986e91c8c7ea1a994781e8fb7fb6751 (patch)
treecd1f5a0e7ab2aefa36433d3aab224ba80b11f21e /library/std/src/sys/pal/unix/stack_overflow.rs
parent1350eead10c46b9d3c2007fe0ea7892b7d7337ab (diff)
parente569c5c92f09007ef593fd897336b337c34fa5c0 (diff)
downloadrust-39af44dae986e91c8c7ea1a994781e8fb7fb6751.tar.gz
rust-39af44dae986e91c8c7ea1a994781e8fb7fb6751.zip
Rollup merge of #126207 - devnexen:stack_overflow_libc_upd, r=joboet
std::unix::stack_overflow::drop_handler addressing todo through libc …

…update
Diffstat (limited to 'library/std/src/sys/pal/unix/stack_overflow.rs')
-rw-r--r--library/std/src/sys/pal/unix/stack_overflow.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/library/std/src/sys/pal/unix/stack_overflow.rs b/library/std/src/sys/pal/unix/stack_overflow.rs
index ac0858e1de8..69b31da427f 100644
--- a/library/std/src/sys/pal/unix/stack_overflow.rs
+++ b/library/std/src/sys/pal/unix/stack_overflow.rs
@@ -265,9 +265,7 @@ 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?
-        const AT_MINSIGSTKSZ: crate::ffi::c_ulong = 51;
-        let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) };
+        let dynamic_sigstksz = unsafe { libc::getauxval(libc::AT_MINSIGSTKSZ) };
         // If getauxval couldn't find the entry, it returns 0,
         // so take the higher of the "constant" and auxval.
         // This transparently supports older kernels which don't provide AT_MINSIGSTKSZ