summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorgaoliming <gaoliming@byosoft.com.cn>2020-09-25 15:49:18 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-10-10 05:43:11 +0000
commitcf0d09ca7b28c360730db645e8bee4dfe0ae3134 (patch)
treecabb16414ea7666e036d32b3282089317dea3c5d /BaseTools
parentf1567720b13a578ffa54716119f826df622babcd (diff)
downloadedk2-cf0d09ca7b28c360730db645e8bee4dfe0ae3134.tar.gz
edk2-cf0d09ca7b28c360730db645e8bee4dfe0ae3134.tar.bz2
edk2-cf0d09ca7b28c360730db645e8bee4dfe0ae3134.zip
BaseTools: Copy PACKED definition from MdePkg Base.h
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2938 MdePkg Acpi10.h definition depends on PACKED. When structure PCD refers to Acpi10.h, build will fail, because PACKED definition is missing in BaseTools BaseTypes.h. C source tools include BaseTools BaseTypes.h. They don't include MdePkg Base.h. When C source tools include MdePkg Acpi10.h, they also need PACKED definition. So, add PACKED definition into BaseTools BaseTypes.h. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Tested-by: Garrett Kirkendall <garrett.kirkendall@amd.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/C/Include/Common/BaseTypes.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/BaseTools/Source/C/Include/Common/BaseTypes.h b/BaseTools/Source/C/Include/Common/BaseTypes.h
index 31d0662085..150980b4c0 100644
--- a/BaseTools/Source/C/Include/Common/BaseTypes.h
+++ b/BaseTools/Source/C/Include/Common/BaseTypes.h
@@ -57,6 +57,16 @@
#define NULL ((VOID *) 0)
#endif
+#ifdef __CC_ARM
+ //
+ // Older RVCT ARM compilers don't fully support #pragma pack and require __packed
+ // as a prefix for the structure.
+ //
+ #define PACKED __packed
+#else
+ #define PACKED
+#endif
+
//
// Support for variable length argument lists using the ANSI standard.
//