rust: pl011: fix repr(C) for PL011Class
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 17 Jan 2025 12:29:17 +0000 (13:29 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Jan 2025 10:03:08 +0000 (11:03 +0100)
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rust/hw/char/pl011/src/device.rs

index 994c2fc0593c85a43ca86976cd916ce0e21a673c..65a1234b9ff4083dc891c02ebde9616962e284b5 100644 (file)
@@ -123,6 +123,7 @@ pub struct PL011State {
 
 qom_isa!(PL011State : SysBusDevice, DeviceState, Object);
 
+#[repr(C)]
 pub struct PL011Class {
     parent_class: <SysBusDevice as ObjectType>::Class,
     /// The byte string that identifies the device.