Add structure packing directives.
authorWilhansen Li <wil@byimplication.com>
Mon, 26 Dec 2016 12:46:48 +0000 (20:46 +0800)
committerWilhansen Li <wil@byimplication.com>
Mon, 26 Dec 2016 12:46:48 +0000 (20:46 +0800)
dtbSplit.cpp

index ae4afe4dfd988003e8f8d2d31d6523db8ae93fd7..1acd5d6eb81ccb2cd0b9dea28217ad7ffa7e6550 100644 (file)
@@ -40,6 +40,7 @@ using namespace std;
 #define DT_HEADER_MAGIC                 0xedfe0dd0
 #define AML_DT_ID_VARI_TOTAL           3
 
+#pragma pack(push, 1)
 struct DTHeader {
        uint32_t     magic;                  /* magic word of OF_DT_HEADER */
        uint32_t     totalsize;              /* total size of DT block */
@@ -58,6 +59,7 @@ struct HeaderEntry {
        uint32_t offset;
        char padding[4];
 };
+#pragma pack(pop)
 
 typedef HeaderEntry<4> HeaderEntryV1;
 typedef HeaderEntry<16> HeaderEntryV2;