std::unix::stack_overflow::drop_handler addressing todo through libc … · qinheping/verify-rust-std@beee93f (original) (raw)

Original file line number Diff line number Diff line change
@@ -265,9 +265,7 @@ mod imp {
265 265 /// Modern kernels on modern hardware can have dynamic signal stack sizes.
266 266 #[cfg(any(target_os = "linux", target_os = "android"))]
267 267 fn sigstack_size() -> usize {
268 -// FIXME: reuse const from libc when available?
269 -const AT_MINSIGSTKSZ: crate::ffi::c_ulong = 51;
270 -let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) };
268 +let dynamic_sigstksz = unsafe { libc::getauxval(libc::AT_MINSIGSTKSZ) };
271 269 // If getauxval couldn't find the entry, it returns 0,
272 270 // so take the higher of the "constant" and auxval.
273 271 // This transparently supports older kernels which don't provide AT_MINSIGSTKSZ