diff options
author | Hou, Wenxing <wenxing.hou@intel.com> | 2024-01-10 19:15:51 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-01-10 15:34:28 +0000 |
commit | e7cfdc5f14b408e85fcbcb335aae7c15bbce4dfb (patch) | |
tree | b680a8e579d5590acdaf5b41bd9a3a69e349aa68 | |
parent | 6c488a2f390d6aacb605b6c370fbe6cc275af4fd (diff) | |
download | edk2-e7cfdc5f14b408e85fcbcb335aae7c15bbce4dfb.tar.gz |
CryptoPkg: Fix redefinition error of int defines
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4632
Move the define to stdint and add MACRO to prevent duplicate inclusion.
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>
-rw-r--r-- | CryptoPkg/Library/Include/CrtLibSupport.h | 15 | ||||
-rw-r--r-- | CryptoPkg/Library/Include/stdint.h | 19 |
2 files changed, 19 insertions, 15 deletions
diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h index 76591f12cb..f36fe08f0c 100644 --- a/CryptoPkg/Library/Include/CrtLibSupport.h +++ b/CryptoPkg/Library/Include/CrtLibSupport.h @@ -424,19 +424,4 @@ 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 786d57e8d5..004c31b70f 100644 --- a/CryptoPkg/Library/Include/stdint.h +++ b/CryptoPkg/Library/Include/stdint.h @@ -6,4 +6,23 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/
+#ifndef CRYPTO_CRT_STDIO_H_
+#define CRYPTO_CRT_STDIO_H_
#include <CrtLibSupport.h>
+
+//
+// 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
|