fix this for stdbuild only
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 9805ef0..74a0b4b 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -416,6 +416,11 @@
// 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,
diff --git a/src/lib.rs b/src/lib.rs
index 2555480..877e87d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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))]
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs
index 00110e1..8fb1a12 100644
--- a/src/unix/bsd/apple/mod.rs
+++ b/src/unix/bsd/apple/mod.rs
@@ -245,7 +245,7 @@
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 @@
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,