提交 ed196221 编写于 作者: B bors

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
此差异已折叠。
......@@ -140,6 +140,7 @@ unsafe fn get_stackp() -> *mut libc::c_void {
#[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 @@ unsafe fn get_stack() -> libc::stack_t {
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 }
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册