gpt/mbr: don't assume gcc isms are present
authorAlan Cox <alan@linux.intel.com>
Thu, 29 Mar 2018 14:56:54 +0000 (15:56 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 29 Mar 2018 14:56:54 +0000 (15:56 +0100)
Kernel/dev/gpt.h
Kernel/dev/mbr.h

index 4e633cb..50f6acf 100644 (file)
@@ -9,7 +9,7 @@
 #define GPT_FUZIX_ROOT_UUID 63ce1ba5-46ab-49bd-abf4-2859975849e1
 #define GPT_FUZIX_ROOT_UUID_16BIT 1ba5
 
-typedef struct __attribute((packed)) {
+typedef struct __packed {
        uint8_t signature[8];
        uint32_t        revision;
        uint32_t        header_size;
@@ -32,7 +32,7 @@ typedef struct __attribute((packed)) {
        /* reserved to end of block */
 } gpt_header_t;
 
-typedef struct __attribute((packed)) {
+typedef struct __packed {
        uint8_t type_guid[16];
        uint8_t uniq_part_guid[16];
        uint32_t        first_lba_lsb;
index 06cbe17..4aaa1b2 100644 (file)
@@ -3,7 +3,7 @@
 
 /* 2015-01-04 Will Sowerbutts */
 
-typedef struct __attribute((packed)) {
+typedef struct __packed {
     /* Described this way so that it packs */
     uint8_t  status_chs_first[4];
     uint8_t  type_chs_last[4];
@@ -13,7 +13,7 @@ typedef struct __attribute((packed)) {
 
 #define MBR_ENTRY_COUNT 4
 #define MBR_SIGNATURE 0xAA55
-typedef struct __attribute((packed)) {
+typedef struct __packed {
     uint8_t bootcode[446];
     partition_table_entry_t partition[MBR_ENTRY_COUNT];
     uint16_t signature;