diff --git a/libc-test/build.rs b/libc-test/build.rs index 0f4efdca638f1b5078a27fcbccaf38849d577c08..9805ef0e2166ce1f1ba4f1a1ff5ac35868432e00 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -416,9 +416,6 @@ fn main() { // which is absent in glibc, has to be defined. "__timeval" if linux => true, - // The alignment of this is 4 on 64-bit OSX... - "kevent" | "shmid_ds" if apple && x86_64 => true, - // This is actually a union, not a struct "sigval" => true, diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 9cd5db654708d882212f8e503c9404b99d8a0ecb..00110e13e25b78b1b85d94b231ef8db745246507 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -245,7 +245,7 @@ s! { pub f_reserved: [::uint32_t; 8], } - // FIXME: this should have align 4 but it's got align 8 on 64-bit + #[repr(packed(4))] pub struct kevent { pub ident: ::uintptr_t, pub filter: ::int16_t, @@ -524,7 +524,7 @@ s! { pub _key: ::key_t, } - // FIXME: this should have align 4 but it's got align 8 on 64-bit + #[repr(packed(4))] pub struct shmid_ds { pub shm_perm: ipc_perm, pub shm_segsz: ::size_t,