#ifndef __GPT_DOT_H__
#define __GPT_DOT_H__
+#include <sys/compiler.h>
+
/* Copyright 2018 Tormod Volden */
#define MBR_GPT_PROTECTED_TYPE 0xEE
#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;
/* 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;
#ifndef __MBR_DOT_H__
#define __MBR_DOT_H__
-/* 2015-01-04 Will Sowerbutts */
+#include <sys/compiler.h>
-typedef struct __attribute((packed)) {
+/* 2015-01-04 Will Sowerbutts */
+typedef struct __packed {
/* Described this way so that it packs */
uint8_t status_chs_first[4];
uint8_t type_chs_last[4];
#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;
--- /dev/null
+#ifndef __SYS_COMPILER_H
+#define __SYS_COMPILER_H
+#if defined(__GCC__)
+#define __packed __attribute((packed))
+#else
+#define __packed
+#endif
+#endif
+