diff --git a/basicmbr.h b/basicmbr.h index b809856..21f962e 100644 --- a/basicmbr.h +++ b/basicmbr.h @@ -34,6 +34,7 @@ struct TempMBR { struct MBRRecord partitions[4]; uint16_t MBRSignature; }; // struct TempMBR +#pragma pack () // Possible states of the MBR enum MBRValidity {invalid, gpt, hybrid, mbr}; diff --git a/bsd.h b/bsd.h index ffbe5cc..cbd3588 100644 --- a/bsd.h +++ b/bsd.h @@ -89,5 +89,6 @@ class BSDData { int GetNumParts(void); GPTPart AsGPT(int i); // Return BSD part. as GPT part. }; // struct MBRData +#pragma pack () #endif diff --git a/gpt.h b/gpt.h index 2d7a1ce..f4bf470 100644 --- a/gpt.h +++ b/gpt.h @@ -57,6 +57,7 @@ struct GPTHeader { uint32_t partitionEntriesCRC; unsigned char reserved2[GPT_RESERVED]; }; // struct GPTHeader +#pragma pack () // Data in GPT format class GPTData { diff --git a/mbrpart.h b/mbrpart.h index f5892e7..0de365f 100644 --- a/mbrpart.h +++ b/mbrpart.h @@ -50,6 +50,7 @@ struct MBRRecord { uint32_t firstLBA; // see above uint32_t lengthLBA; }; // struct MBRRecord +#pragma pack () class MBRPart { protected: