remove newer __ssp field from ucontext_t for earlier glib compat

Per discussion in #1410, this is necessary to avoid struct size mismatches between Rust and C on
systems with glibc < 2.28.
This commit is contained in:
Adam C. Foltzer 2019-06-26 15:51:08 -07:00
parent 40c73a6eed
commit dba4138305
No known key found for this signature in database
GPG Key ID: 2A91B421C62B535C
2 changed files with 4 additions and 2 deletions

View File

@ -1950,7 +1950,6 @@ fn test_linux(target: &str) {
"syslog.h",
"termios.h",
"time.h",
"ucontext.h",
"unistd.h",
"utime.h",
"utmp.h",
@ -1968,6 +1967,10 @@ fn test_linux(target: &str) {
// <execinfo.h> is not supported by musl:
// https://www.openwall.com/lists/musl/2015/04/09/3
[!musl]: "execinfo.h",
// ucontext_t added a new field as of glibc 2.28; our struct definition is
// conservative and omits the field, but that means the size doesn't match for newer
// glibcs
[!gnu]: "ucontext.h",
}
// Include linux headers at the end:

View File

@ -285,7 +285,6 @@ s_no_extra_traits! {
pub uc_mcontext: mcontext_t,
pub uc_sigmask: ::sigset_t,
__private: [u8; 512],
__ssp: [::c_ulonglong; 4],
}
}