From 5e187562eed6ab051db0764b7320703939dfb359 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 21 Jan 2019 18:37:55 +0100 Subject: 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 --- src/unix/bsd/freebsdlike/dragonfly/mod.rs | 6 ++++++ src/unix/bsd/freebsdlike/freebsd/mod.rs | 6 ++++++ src/unix/bsd/freebsdlike/mod.rs | 7 ------- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs index b7029b01d7..992d0082e4 100644 --- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs +++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -210,6 +210,12 @@ s! { pub sdl_rcf: ::c_ushort, pub sdl_route: [::c_ushort; 16], } + + pub struct stack_t { + pub ss_sp: *mut ::c_char, + pub ss_size: ::size_t, + pub ss_flags: ::c_int, + } } pub const RAND_MAX: ::c_int = 0x7fff_ffff; diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 2bc900d321..91eab30b9e 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -184,6 +184,12 @@ s! { pub sdl_slen: ::c_uchar, pub sdl_data: [::c_char; 46], } + + pub struct stack_t { + pub ss_sp: *mut ::c_void, + pub ss_size: ::size_t, + pub ss_flags: ::c_int, + } } pub const SIGEV_THREAD_ID: ::c_int = 4; diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 9829dde4f3..22c11b3698 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -82,13 +82,6 @@ s! { pub sa_mask: sigset_t, } - pub struct stack_t { - // In FreeBSD 11 and later, ss_sp is actually a void* - pub ss_sp: *mut ::c_char, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, - } - pub struct sched_param { pub sched_priority: ::c_int, } -- cgit v1.2.1