Rollup merge of #88381 - rtzoeller:dfly_stack_t_ss_sp_void, r=dtolnay

Handle stack_t.ss_sp type change for DragonFlyBSD

stack_t.ss_sp is now c_void on DragonFlyBSD, like the rest of the BSDs.

Changed in 02922ef750.
This commit is contained in:
Guillaume Gomez 2021-08-29 16:25:31 +02:00 committed by GitHub
commit 281dfac12f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,24 +161,10 @@ mod imp {
stackp.add(page_size())
}
#[cfg(any(
target_os = "linux",
target_os = "macos",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
target_os = "illumos"
))]
unsafe fn get_stack() -> libc::stack_t {
libc::stack_t { ss_sp: get_stackp(), ss_flags: 0, ss_size: SIGSTKSZ }
}
#[cfg(target_os = "dragonfly")]
unsafe fn get_stack() -> libc::stack_t {
libc::stack_t { ss_sp: get_stackp() as *mut i8, ss_flags: 0, ss_size: SIGSTKSZ }
}
pub unsafe fn make_handler() -> Handler {
if !NEED_ALTSTACK.load(Ordering::Relaxed) {
return Handler::null();