FreeBSD 10.x is EOL, in FreeBSD 11 and later, ss_sp is actually a void* [1]

dragonflybsd still uses c_char [2]

[1] https://svnweb.freebsd.org/base/releng/11.2/sys/sys/signal.h?revision=334459&view=markup#l438
[2] https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/sys/sys/signal.h#L339
This commit is contained in:
MikaelUrankar
2019-01-21 18:52:57 +01:00
parent 48e354d224
commit de021e39e6

View File

@@ -140,6 +140,7 @@ mod imp {
#[cfg(any(target_os = "linux",
target_os = "macos",
target_os = "bitrig",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris"))]
@@ -147,8 +148,7 @@ mod imp {
libc::stack_t { ss_sp: get_stackp(), ss_flags: 0, ss_size: SIGSTKSZ }
}
#[cfg(any(target_os = "freebsd",
target_os = "dragonfly"))]
#[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 }
}