Skip to content

Commit d633408

Browse files
committed
Fix: repr(packed) does not imply repr(C)
1 parent 6c01f45 commit d633408

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

bios/boot_sector/src/dap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use core::arch::asm;
22

3-
#[repr(packed)]
3+
#[repr(C, packed)]
44
#[allow(dead_code)] // the structure format is defined by the hardware
55
pub struct DiskAddressPacket {
66
/// Size of the DAP structure

bios/stage-2/src/dap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use core::arch::asm;
22

33
#[derive(Debug, Clone, Copy)]
44
#[allow(dead_code)]
5-
#[repr(packed)]
5+
#[repr(C, packed)]
66
pub struct DiskAddressPacket {
77
/// Size of the DAP structure
88
packet_size: u8,

bios/stage-2/src/vesa.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use bootloader_x86_64_bios_common::PixelFormat;
55
use crate::{disk::AlignedBuffer, AlignedArrayBuffer};
66
use core::arch::asm;
77

8-
#[repr(packed)]
8+
#[repr(C, packed)]
99
#[allow(dead_code)]
1010
struct VbeInfoBlock {
1111
signature: [u8; 4], // should be "VESA"

0 commit comments

Comments
 (0)