fix this for stdbuild only

This commit is contained in:
gnzlbg 2018-04-15 14:50:00 +02:00
parent dc1956e2ef
commit dfee17f1ff
3 changed files with 8 additions and 3 deletions

View File

@ -416,6 +416,11 @@ fn main() {
// which is absent in glibc, has to be defined.
"__timeval" if linux => true,
// Fixed on stdbuild with repr(packed(4))
// Once repr_packed stabilizes we can fix this unconditionally
// and remove this check.
"kevent" | "shmid_ds" if apple && x86_64 => true,
// This is actually a union, not a struct
"sigval" => true,

View File

@ -87,7 +87,7 @@
// Attributes needed when building as part of the standard library
#![cfg_attr(feature = "stdbuild", feature(no_std, staged_api, custom_attribute, cfg_target_vendor))]
#![cfg_attr(feature = "stdbuild", feature(link_cfg))]
#![cfg_attr(feature = "stdbuild", feature(link_cfg, repr_packed))]
#![cfg_attr(feature = "stdbuild", no_std)]
#![cfg_attr(feature = "stdbuild", staged_api)]
#![cfg_attr(feature = "stdbuild", allow(warnings))]

View File

@ -245,7 +245,7 @@ s! {
pub f_reserved: [::uint32_t; 8],
}
#[repr(packed(4))]
#[cfg_attr(feature = "stdbuild", repr(packed(4)))]
pub struct kevent {
pub ident: ::uintptr_t,
pub filter: ::int16_t,
@ -524,7 +524,7 @@ s! {
pub _key: ::key_t,
}
#[repr(packed(4))]
#[cfg_attr(feature = "stdbuild", repr(packed(4)))]
pub struct shmid_ds {
pub shm_perm: ipc_perm,
pub shm_segsz: ::size_t,