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.patch57
1 files changed, 57 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..7fede93c
--- /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,57 @@
1
2Upstream-Status: Backport
3Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
4
5 MdePkg/Include/Base.h | 12 ++++++++++++
6 1 file changed, 12 insertions(+)
7
8diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
9index 2da08b0c78..072eefdb94 100644
10--- a/MdePkg/Include/Base.h
11+++ b/MdePkg/Include/Base.h
12@@ -318,7 +318,11 @@ struct _LIST_ENTRY {
13 ///
14 /// NULL pointer (VOID *)
15 ///
16+#ifndef OS_BUILD
17+#ifndef UNIT_TEST_UEFI_BUILD
18 #define NULL ((VOID *) 0)
19+#endif
20+#endif
21
22 //
23 // Null character
24@@ -810,6 +814,8 @@ typedef UINTN *BASE_LIST;
25 // Section 2.3.1 of the UEFI 2.3 Specification.
26 //
27
28+#ifndef OS_BUILD
29+#ifndef UNIT_TEST_UEFI_BUILD
30 STATIC_ASSERT (sizeof (BOOLEAN) == 1, "sizeof (BOOLEAN) does not meet UEFI Specification Data Type requirements");
31 STATIC_ASSERT (sizeof (INT8) == 1, "sizeof (INT8) does not meet UEFI Specification Data Type requirements");
32 STATIC_ASSERT (sizeof (UINT8) == 1, "sizeof (UINT8) does not meet UEFI Specification Data Type requirements");
33@@ -823,6 +829,8 @@ STATIC_ASSERT (sizeof (CHAR8) == 1, "sizeof (CHAR8) does not meet UEFI Specifi
34 STATIC_ASSERT (sizeof (CHAR16) == 2, "sizeof (CHAR16) does not meet UEFI Specification Data Type requirements");
35 STATIC_ASSERT (sizeof (L'A') == 2, "sizeof (L'A') does not meet UEFI Specification Data Type requirements");
36 STATIC_ASSERT (sizeof (L"A") == 4, "sizeof (L\"A\") does not meet UEFI Specification Data Type requirements");
37+#endif
38+#endif
39
40 //
41 // The following three enum types are used to verify that the compiler
42@@ -843,9 +851,13 @@ typedef enum {
43 __VerifyUint32EnumValue = 0xffffffff
44 } __VERIFY_UINT32_ENUM_SIZE;
45
46+#ifndef OS_BUILD
47+#ifndef UNIT_TEST_UEFI_BUILD
48 STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
49 STATIC_ASSERT (sizeof (__VERIFY_UINT16_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
50 STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
51+#endif
52+#endif
53
54 /**
55 Macro that returns a pointer to the data structure that contains a specified field of
56--
572.31.0.windows.1