From: Wilhansen Li Date: Mon, 26 Dec 2016 12:46:48 +0000 (+0800) Subject: Add structure packing directives. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4a2fab8e9c263d7a54fbf6333c051b74ea4fc2ce;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_tools_dtbtool.git Add structure packing directives. --- diff --git a/dtbSplit.cpp b/dtbSplit.cpp index ae4afe4..1acd5d6 100644 --- a/dtbSplit.cpp +++ b/dtbSplit.cpp @@ -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;