diff --git a/src/bytes.rs b/src/bytes.rs
index cca6f8c324d95cdb810a3cfaf7564c3535517fab..9db426e22b4f727b538517e51f470c929cf9723b 100644
--- a/src/bytes.rs
+++ b/src/bytes.rs
@@ -258,6 +258,7 @@ impl<B: ByteStr> ByteStrPriv for B {
 
 // TODO: Figure out how to not depend on the memory layout of trait objects
 // Blocked: rust-lang/rust#24050
+#[repr(C)]
 struct TraitObject {
     data: *mut (),
     vtable: *mut (),