summaryrefslogtreecommitdiffstats
path: root/CryptoPkg/Library
diff options
context:
space:
mode:
authorYi Li <yi1.li@intel.com>2023-08-03 12:37:45 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-08-09 07:10:31 +0000
commit46226fb5d32f6e24eb8f8f48cceb0f67fd8585d4 (patch)
treec091bff667a3b81285e254acbaa3b556999ee7d5 /CryptoPkg/Library
parentc0aeb92663460908c7479ab6fc0d28e3fad9054a (diff)
downloadedk2-46226fb5d32f6e24eb8f8f48cceb0f67fd8585d4.tar.gz
edk2-46226fb5d32f6e24eb8f8f48cceb0f67fd8585d4.tar.bz2
edk2-46226fb5d32f6e24eb8f8f48cceb0f67fd8585d4.zip
CryptoPkg: remove strcmp to syscall
In rare cases the platform may not provide the full IntrinsicLib. But openssl30 build always require strcmp, provide this function by moving it into CrtWrapper.c. Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Brian J. Johnson <brian.johnson@hpe.com> Tested-by: Kenneth Lautner <klautner@microsoft.com>
Diffstat (limited to 'CryptoPkg/Library')
-rw-r--r--CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c9
-rw-r--r--CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c9
2 files changed, 9 insertions, 9 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
index 6d7ac3efdc..37cdecc9bd 100644
--- a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
+++ b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
@@ -275,6 +275,15 @@ strcpy (
return strDest;
}
+int
+strcmp (
+ const char *s1,
+ const char *s2
+ )
+{
+ return (int)AsciiStrCmp (s1, s2);
+}
+
//
// -- Character Classification Routines --
//
diff --git a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c b/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c
index 611e9fd773..9b091f1901 100644
--- a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c
+++ b/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c
@@ -63,12 +63,3 @@ memcmp (
{
return (int)CompareMem (buf1, buf2, count);
}
-
-int
-strcmp (
- const char *s1,
- const char *s2
- )
-{
- return (int)AsciiStrCmp (s1, s2);
-}