mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
pci: use C ABI-qualification for a packed structure
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
@@ -1159,7 +1159,7 @@ mod tests {
|
|||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[repr(packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Clone, Copy, Default)]
|
#[derive(Clone, Copy, Default)]
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
struct TestCap {
|
struct TestCap {
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ impl Snapshottable for MsixConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
#[repr(packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Clone, Copy, Default, Serialize, Deserialize)]
|
#[derive(Clone, Copy, Default, Serialize, Deserialize)]
|
||||||
pub struct MsixCap {
|
pub struct MsixCap {
|
||||||
// Message Control Register
|
// Message Control Register
|
||||||
|
|||||||
Reference in New Issue
Block a user