From 46226fb5d32f6e24eb8f8f48cceb0f67fd8585d4 Mon Sep 17 00:00:00 2001 From: Yi Li Date: Thu, 3 Aug 2023 12:37:45 +0800 Subject: 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 Cc: Jiewen Yao Cc: Xiaoyu Lu Cc: Guomin Jiang Reviewed-by: Jiewen Yao Acked-by: Ard Biesheuvel Tested-by: Ard Biesheuvel Tested-by: Brian J. Johnson Tested-by: Kenneth Lautner --- CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c | 9 +++++++++ CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'CryptoPkg/Library') 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); -} -- cgit v1.2.3