Skip to content

Commit e979fff

Browse files
committed
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 rust-lang/rust#57810
2 parents fb2b3da + 5e18756 commit e979fff

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ s! {
210210
pub sdl_rcf: ::c_ushort,
211211
pub sdl_route: [::c_ushort; 16],
212212
}
213+
214+
pub struct stack_t {
215+
pub ss_sp: *mut ::c_char,
216+
pub ss_size: ::size_t,
217+
pub ss_flags: ::c_int,
218+
}
213219
}
214220

215221
pub const RAND_MAX: ::c_int = 0x7fff_ffff;

src/unix/bsd/freebsdlike/freebsd/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ s! {
184184
pub sdl_slen: ::c_uchar,
185185
pub sdl_data: [::c_char; 46],
186186
}
187+
188+
pub struct stack_t {
189+
pub ss_sp: *mut ::c_void,
190+
pub ss_size: ::size_t,
191+
pub ss_flags: ::c_int,
192+
}
187193
}
188194

189195
pub const SIGEV_THREAD_ID: ::c_int = 4;

src/unix/bsd/freebsdlike/mod.rs

-7
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,6 @@ s! {
8282
pub sa_mask: sigset_t,
8383
}
8484

85-
pub struct stack_t {
86-
// In FreeBSD 11 and later, ss_sp is actually a void*
87-
pub ss_sp: *mut ::c_char,
88-
pub ss_size: ::size_t,
89-
pub ss_flags: ::c_int,
90-
}
91-
9285
pub struct sched_param {
9386
pub sched_priority: ::c_int,
9487
}

0 commit comments

Comments
 (0)