summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-01-23 11:08:59 +0000
committerbors <bors@rust-lang.org>2019-01-23 11:08:59 +0000
commite979ffff51b5bfa64f182a241daec319837cb6a1 (patch)
tree30914c596284b6f9ed2e64db9e780cfb27aec96d
parentfb2b3dac03d4a9ed002893706ff28b364b969721 (diff)
parent5e187562eed6ab051db0764b7320703939dfb359 (diff)
downloadrust-libc-e979ffff51b5bfa64f182a241daec319837cb6a1.tar.gz
Auto merge of #1222 - MikaelUrankar:stack_t_bsd, r=gnzlbg
fix stack_t on FreeBSD 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 should be committed with https://github.com/rust-lang/rust/pull/57810
-rw-r--r--src/unix/bsd/freebsdlike/dragonfly/mod.rs6
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/mod.rs6
-rw-r--r--src/unix/bsd/freebsdlike/mod.rs7
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,
}