From a3113721d4efbda97c0ea99c8639fc9ba4a92650 Mon Sep 17 00:00:00 2001 From: Liav A Date: Sat, 1 Feb 2020 18:17:50 +0200 Subject: [PATCH] Partition Table: Replace __attribute__((packed)) with [[gnu::packed]] --- Kernel/Devices/GPTPartitionTable.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Kernel/Devices/GPTPartitionTable.h b/Kernel/Devices/GPTPartitionTable.h index bf0fb0c4e7..9ec4ac3ea5 100644 --- a/Kernel/Devices/GPTPartitionTable.h +++ b/Kernel/Devices/GPTPartitionTable.h @@ -27,6 +27,7 @@ #pragma once #include +#include #include #include #include @@ -35,7 +36,8 @@ #define GPT_SIGNATURE 0x20494645 #define BytesPerSector 512 -struct GPTPartitionEntry { +struct [[gnu::packed]] GPTPartitionEntry +{ u32 partition_guid[4]; u32 unique_guid[4]; @@ -44,9 +46,10 @@ struct GPTPartitionEntry { u64 attributes; u8 partition_name[72]; -} __attribute__((packed)); +}; -struct GPTPartitionHeader { +struct [[gnu::packed]] GPTPartitionHeader +{ u32 sig[2]; u32 revision; u32 header_size; @@ -65,7 +68,7 @@ struct GPTPartitionHeader { u32 entries_count; u32 partition_entry_size; u32 crc32_entries_array; -} __attribute__((packed)); +}; class GPTPartitionTable {