Auto merge of #57810 - MikaelUrankar:stack_t_bsd, r=nagisa

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

…d* [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:
bors 2019-03-22 14:19:42 +00:00
commit ed196221d8
2 changed files with 66 additions and 66 deletions

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 }
}