summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch
new file mode 100644
index 00000000..11305e83
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch
@@ -0,0 +1,59 @@
1Subject: [PATCH] [PATCH]: ignore static asserts and null define for os and ut
2 builds
3Upstream-Status: Backport
4Signed-off-by: Teoh Suh Haw <suh.haw.teoh@intel.com>
5---
6 MdePkg/Include/Base.h | 12 ++++++++++++
7 1 file changed, 12 insertions(+)
8
9diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
10index d209e6de28..6e61b8f3d3 100644
11--- a/MdePkg/Include/Base.h
12+++ b/MdePkg/Include/Base.h
13@@ -316,8 +316,12 @@ struct _LIST_ENTRY {
14 #define NULL __null
15 #endif
16 #else
17+#ifndef OS_BUILD
18+#ifndef UNIT_TEST_UEFI_BUILD
19 #define NULL ((VOID *) 0)
20 #endif
21+#endif
22+#endif
23
24 //
25 // Null character
26@@ -779,6 +783,8 @@ typedef UINTN *BASE_LIST;
27 // Section 2.3.1 of the UEFI 2.3 Specification.
28 //
29
30+#ifndef OS_BUILD
31+#ifndef UNIT_TEST_UEFI_BUILD
32 STATIC_ASSERT (sizeof (BOOLEAN) == 1, "sizeof (BOOLEAN) does not meet UEFI Specification Data Type requirements");
33 STATIC_ASSERT (sizeof (INT8) == 1, "sizeof (INT8) does not meet UEFI Specification Data Type requirements");
34 STATIC_ASSERT (sizeof (UINT8) == 1, "sizeof (UINT8) does not meet UEFI Specification Data Type requirements");
35@@ -792,6 +798,8 @@ STATIC_ASSERT (sizeof (CHAR8) == 1, "sizeof (CHAR8) does not meet UEFI Specifi
36 STATIC_ASSERT (sizeof (CHAR16) == 2, "sizeof (CHAR16) does not meet UEFI Specification Data Type requirements");
37 STATIC_ASSERT (sizeof (L'A') == 2, "sizeof (L'A') does not meet UEFI Specification Data Type requirements");
38 STATIC_ASSERT (sizeof (L"A") == 4, "sizeof (L\"A\") does not meet UEFI Specification Data Type requirements");
39+#endif
40+#endif
41
42 //
43 // The following three enum types are used to verify that the compiler
44@@ -812,9 +820,13 @@ typedef enum {
45 __VerifyUint32EnumValue = 0xffffffff
46 } __VERIFY_UINT32_ENUM_SIZE;
47
48+#ifndef OS_BUILD
49+#ifndef UNIT_TEST_UEFI_BUILD
50 STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
51 STATIC_ASSERT (sizeof (__VERIFY_UINT16_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
52 STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
53+#endif
54+#endif
55
56 /**
57 Macro that returns a pointer to the data structure that contains a specified field of
58--
592.37.3