Skip to content

Commit 355a93c

Browse files
committed
std::unix::stack_overflow::drop_handler addressing todo through libc update
1 parent 86bd459 commit 355a93c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,10 @@ mod imp {
265265
/// Modern kernels on modern hardware can have dynamic signal stack sizes.
266266
#[cfg(any(target_os = "linux", target_os = "android"))]
267267
fn sigstack_size() -> usize {
268-
// FIXME: reuse const from libc when available?
268+
#[cfg(target_os = "linux")]
269+
const AT_MINSIGSTKSZ: crate::ffi::c_ulong = libc::AT_MINSIGSTKSZ;
270+
// FIXME: reuse const from libc when available ?
271+
#[cfg(target_os = "android")]
269272
const AT_MINSIGSTKSZ: crate::ffi::c_ulong = 51;
270273
let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) };
271274
// If getauxval couldn't find the entry, it returns 0,

0 commit comments

Comments
 (0)