#pragma pack() is also supported in GCC
This commit is contained in:
parent
4d1fb71456
commit
2b8129b83b
2 changed files with 3 additions and 29 deletions
21
efi_types.h
21
efi_types.h
|
@ -197,10 +197,7 @@ typedef struct {
|
|||
} EFI_GUID;
|
||||
|
||||
// MBR Partition Entry
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
UINT8 BootIndicator;
|
||||
UINT8 StartHead;
|
||||
|
@ -212,36 +209,22 @@ typedef struct {
|
|||
UINT8 EndTrack;
|
||||
UINT8 StartingLBA[4];
|
||||
UINT8 SizeInLBA[4];
|
||||
#if defined(_MSC_VER)
|
||||
} MBR_PARTITION_RECORD;
|
||||
#pragma pack()
|
||||
#else
|
||||
} __attribute__((packed)) MBR_PARTITION_RECORD;
|
||||
#endif
|
||||
|
||||
// Master Boot Record
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
UINT8 BootStrapCode[440];
|
||||
UINT8 UniqueMbrSignature[4];
|
||||
UINT8 Unknown[2];
|
||||
MBR_PARTITION_RECORD Partition[4];
|
||||
UINT16 Signature;
|
||||
#if defined(_MSC_VER)
|
||||
} MASTER_BOOT_RECORD;
|
||||
#pragma pack()
|
||||
#else
|
||||
} __attribute__((packed)) MASTER_BOOT_RECORD;
|
||||
#endif
|
||||
|
||||
// GPT Partition Entry
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
EFI_GUID PartitionTypeGUID;
|
||||
EFI_GUID UniquePartitionGUID;
|
||||
|
@ -249,11 +232,7 @@ typedef struct {
|
|||
EFI_LBA EndingLBA;
|
||||
UINT64 Attributes;
|
||||
CHAR16 PartitionName[36];
|
||||
#if defined(_MSC_VER)
|
||||
} EFI_PARTITION_ENTRY;
|
||||
#pragma pack()
|
||||
#else
|
||||
} __attribute__((packed)) EFI_PARTITION_ENTRY;
|
||||
#endif
|
||||
|
||||
#endif /* EFI_TYPES_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue