Add gcc_struct to all packed structures when compiling with mingw.
Just "packed" doesn't always pack the way we expect.
This commit is contained in:
parent
ae8159b9ca
commit
7e47e27bd8
105 changed files with 403 additions and 391 deletions
|
@ -47,7 +47,7 @@ struct grub_ohci_hcca
|
|||
grub_uint32_t donehead;
|
||||
|
||||
grub_uint8_t reserved[116];
|
||||
} __attribute__((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
/* OHCI General Transfer Descriptor */
|
||||
struct grub_ohci_td
|
||||
|
@ -64,7 +64,7 @@ struct grub_ohci_td
|
|||
* physical address in CPU endian */
|
||||
grub_uint32_t tr_index; /* index of TD in transfer */
|
||||
grub_uint8_t pad[8 - sizeof (volatile struct grub_ohci_td *)]; /* padding to 32 bytes */
|
||||
} __attribute__((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
/* OHCI Endpoint Descriptor. */
|
||||
struct grub_ohci_ed
|
||||
|
@ -73,7 +73,7 @@ struct grub_ohci_ed
|
|||
grub_uint32_t td_tail;
|
||||
grub_uint32_t td_head;
|
||||
grub_uint32_t next_ed;
|
||||
} __attribute__((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
typedef volatile struct grub_ohci_td *grub_ohci_td_t;
|
||||
typedef volatile struct grub_ohci_ed *grub_ohci_ed_t;
|
||||
|
|
|
@ -55,7 +55,7 @@ struct grub_pl2303_config
|
|||
grub_uint8_t stop_bits;
|
||||
grub_uint8_t parity;
|
||||
grub_uint8_t word_len;
|
||||
} __attribute__ ((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
static void
|
||||
real_config (struct grub_serial_port *port)
|
||||
|
|
|
@ -105,7 +105,7 @@ struct grub_uhci_qh
|
|||
/* Queue heads are aligned on 16 bytes, pad so a queue head is 16
|
||||
bytes so we can store many in a 4K page. */
|
||||
grub_uint8_t pad[8];
|
||||
} __attribute__ ((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
/* UHCI Transfer Descriptor. */
|
||||
struct grub_uhci_td
|
||||
|
@ -129,7 +129,7 @@ struct grub_uhci_td
|
|||
|
||||
/* 3 additional 32 bits words reserved for the Host Controller Driver. */
|
||||
grub_uint32_t data[3];
|
||||
} __attribute__ ((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
typedef volatile struct grub_uhci_td *grub_uhci_td_t;
|
||||
typedef volatile struct grub_uhci_qh *grub_uhci_qh_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue