Skip to content

Commit

Permalink
Handle stack_t.ss_sp type change for DragonFlyBSD
Browse files Browse the repository at this point in the history
stack_t.ss_sp is now c_void on DragonFlyBSD, so the specialization is no longer needed.

Changed in rust-lang/libc@02922ef.
  • Loading branch information
rtzoeller committed Aug 27, 2021
1 parent d5cd320 commit 0d1d978
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions library/std/src/sys/unix/stack_overflow.rs
Expand Up @@ -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();
Expand Down

0 comments on commit 0d1d978

Please sign in to comment.