diff --git a/src/linux.rs b/src/linux.rs --- a/src/linux.rs +++ b/src/linux.rs @@ -1,7 +1,16 @@ /* automatically generated by rust-bindgen 0.70.1 */ -#[repr(C)] +#[repr(transparent)] #[derive(Default)] +#[cfg_attr( + feature = "zerocopy", + derive( + zerocopy_derive::KnownLayout, + zerocopy_derive::Immutable, + zerocopy_derive::FromBytes, + zerocopy_derive::IntoBytes, + ) +)] pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); impl __IncompleteArrayField { #[inline] diff --git a/src/macos.rs b/src/macos.rs --- a/src/macos.rs +++ b/src/macos.rs @@ -1,7 +1,16 @@ /* automatically generated by rust-bindgen 0.70.1 */ -#[repr(C)] +#[repr(transparent)] #[derive(Default)] +#[cfg_attr( + feature = "zerocopy", + derive( + zerocopy_derive::KnownLayout, + zerocopy_derive::Immutable, + zerocopy_derive::FromBytes, + zerocopy_derive::IntoBytes, + ) +)] pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); impl __IncompleteArrayField { #[inline]