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
|
@ -43,10 +43,10 @@ struct grub_acorn_boot_block
|
|||
grub_uint8_t flags;
|
||||
grub_uint16_t start_cylinder;
|
||||
grub_uint8_t checksum;
|
||||
} __attribute__ ((packed, aligned));
|
||||
} GRUB_PACKED;
|
||||
grub_uint8_t bin[0x200];
|
||||
};
|
||||
} __attribute__ ((packed, aligned));
|
||||
} GRUB_PACKED;
|
||||
|
||||
struct linux_part
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ struct grub_amiga_rdsk
|
|||
grub_uint32_t fslst;
|
||||
|
||||
grub_uint32_t unused[AMIGA_CHECKSUM_WORDS - 9];
|
||||
} __attribute__ ((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
struct grub_amiga_partition
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ struct grub_amiga_partition
|
|||
|
||||
grub_uint32_t firstcyl;
|
||||
grub_uint32_t unused[AMIGA_CHECKSUM_WORDS - 44];
|
||||
} __attribute__ ((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
static struct grub_partition_map grub_amiga_partition_map;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ struct grub_dvh_partition_descriptor
|
|||
grub_uint32_t length;
|
||||
grub_uint32_t start;
|
||||
grub_uint32_t type;
|
||||
} __attribute__ ((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
struct grub_dvh_block
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ struct grub_dvh_block
|
|||
struct grub_dvh_partition_descriptor parts[16];
|
||||
grub_uint32_t checksum;
|
||||
grub_uint32_t unused2;
|
||||
} __attribute__ ((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
static struct grub_partition_map grub_dvh_partition_map;
|
||||
|
||||
|
|
|
@ -38,13 +38,13 @@ struct grub_sun_partition_info
|
|||
grub_uint8_t id;
|
||||
grub_uint8_t spare2;
|
||||
grub_uint8_t flags;
|
||||
} __attribute__ ((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
struct grub_sun_partition_descriptor
|
||||
{
|
||||
grub_uint32_t start_cylinder;
|
||||
grub_uint32_t num_sectors;
|
||||
} __attribute__ ((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
struct grub_sun_block
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ struct grub_sun_block
|
|||
struct grub_sun_partition_descriptor partitions[8];
|
||||
grub_uint16_t magic; /* Magic number. */
|
||||
grub_uint16_t csum; /* Label xor'd checksum. */
|
||||
} __attribute__ ((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
static struct grub_partition_map grub_sun_partition_map;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ struct grub_sun_pc_partition_descriptor
|
|||
grub_uint16_t unused;
|
||||
grub_uint32_t start_sector;
|
||||
grub_uint32_t num_sectors;
|
||||
} __attribute__ ((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
struct grub_sun_pc_block
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ struct grub_sun_pc_block
|
|||
grub_uint8_t unused2[244];
|
||||
grub_uint16_t magic; /* Magic number. */
|
||||
grub_uint16_t csum; /* Label xor'd checksum. */
|
||||
} __attribute__ ((packed));
|
||||
} GRUB_PACKED;
|
||||
|
||||
static struct grub_partition_map grub_sun_pc_partition_map;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue