summaryrefslogtreecommitdiffstats
path: root/CryptoPkg
diff options
context:
space:
mode:
authorHou, Wenxing <wenxing.hou@intel.com>2024-01-04 16:19:55 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-01-04 09:50:35 +0000
commite449451770193c8eb36e4dc3a770c8ee353183aa (patch)
treeb92dbac2dd3d696af6133a0f1d22b1b0e87d0319 /CryptoPkg
parent16c8cfc81054aa76e133eab1033560052727cab5 (diff)
downloadedk2-e449451770193c8eb36e4dc3a770c8ee353183aa.tar.gz
edk2-e449451770193c8eb36e4dc3a770c8ee353183aa.tar.bz2
edk2-e449451770193c8eb36e4dc3a770c8ee353183aa.zip
CryptoPkg: move define to CrtLibSupport
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4632 The before code will cause redefine error. This patch move them to CrtLibSupport header. But Openssl has already defined them internally, need to increase support for OPENSLL_SYS_UEFI judgment. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
Diffstat (limited to 'CryptoPkg')
-rw-r--r--CryptoPkg/Library/Include/CrtLibSupport.h15
-rw-r--r--CryptoPkg/Library/Include/stdint.h10
2 files changed, 15 insertions, 10 deletions
diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h
index f36fe08f0c..76591f12cb 100644
--- a/CryptoPkg/Library/Include/CrtLibSupport.h
+++ b/CryptoPkg/Library/Include/CrtLibSupport.h
@@ -424,4 +424,19 @@ strcpy (
#define atoi(nptr) AsciiStrDecimalToUintn(nptr)
#define gettimeofday(tvp, tz) do { (tvp)->tv_sec = time(NULL); (tvp)->tv_usec = 0; } while (0)
+//
+// only use in Mbedlts. The Openssl has defined them internally.
+//
+#ifndef OPENSSL_SYS_UEFI
+typedef INT8 int8_t;
+typedef UINT8 uint8_t;
+typedef INT16 int16_t;
+typedef UINT16 uint16_t;
+typedef INT32 int32_t;
+typedef UINT32 uint32_t;
+typedef INT64 int64_t;
+typedef UINT64 uint64_t;
+typedef UINTN uintptr_t;
+#endif
+
#endif
diff --git a/CryptoPkg/Library/Include/stdint.h b/CryptoPkg/Library/Include/stdint.h
index 17b8c767d7..786d57e8d5 100644
--- a/CryptoPkg/Library/Include/stdint.h
+++ b/CryptoPkg/Library/Include/stdint.h
@@ -7,13 +7,3 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <CrtLibSupport.h>
-
-typedef INT8 int8_t;
-typedef UINT8 uint8_t;
-typedef INT16 int16_t;
-typedef UINT16 uint16_t;
-typedef INT32 int32_t;
-typedef UINT32 uint32_t;
-typedef INT64 int64_t;
-typedef UINT64 uint64_t;
-typedef UINTN uintptr_t;