#pragma pack() is also supported in GCC

This commit is contained in:
Jozef Nagy 2024-03-30 09:43:51 +01:00
parent 4d1fb71456
commit 2b8129b83b
No known key found for this signature in database
GPG key ID: 5B49DC29F09685D6
2 changed files with 3 additions and 29 deletions

View file

@ -1041,11 +1041,10 @@ typedef struct _EFI_RAM_DISK_PROTOCOL {
#define PARTITION_TYPE_MBR 0x01
#define PARTITION_TYPE_GPT 0x02
#if defined(_MSC_VER)
#pragma pack(1)
#endif
typedef struct _EFI_PARTITION_INFO_PROTOCOL EFI_PARTITION_INFO_PROTOCOL;
typedef struct {
#pragma pack(1)
typedef struct _EFI_PARTITION_INFO_PROTOCOL {
UINT32 Revision;
UINT32 Type;
UINT8 System;
@ -1054,12 +1053,8 @@ typedef struct {
MBR_PARTITION_RECORD Mbr;
EFI_PARTITION_ENTRY Gpt;
} Info;
#if defined(_MSC_VER)
} EFI_PARTITION_INFO_PROTOCOL;
#pragma pack()
#else
} __attribute__((packed)) EFI_PARTITION_INFO_PROTOCOL;
#endif
////
// NVDIMM Label Protocol