[edk2-devel] [Patch V2] CryptoPkg: Fix the build failure in CryptoPkg

duntan posted 1 patch 2 years ago
Failed in applying to current master (apply log)
CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c | 4 ++--
CryptoPkg/Library/Include/CrtLibSupport.h           | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
[edk2-devel] [Patch V2] CryptoPkg: Fix the build failure in CryptoPkg
Posted by duntan 2 years ago
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3908

Fix the build failure in CryptoPkg caused by this commit:
fab6285a73("CryptoPkg/CrtLibSupport: fix strcpy")
Remove the 'restrict' keyword which starts in VS2019.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
---
 CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c | 4 ++--
 CryptoPkg/Library/Include/CrtLibSupport.h           | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
index 6fcbe5885e..c1fc33538f 100644
--- a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
+++ b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
@@ -267,8 +267,8 @@ strcspn (
 
 char *
 strcpy (
-  char *restrict  strDest,
-  const char      *strSource
+  char        *strDest,
+  const char  *strSource
   )
 {
   AsciiStrCpyS (strDest, MAX_STRING_SIZE, strSource);
diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h
index bdc2654b6e..e49060124f 100644
--- a/CryptoPkg/Library/Include/CrtLibSupport.h
+++ b/CryptoPkg/Library/Include/CrtLibSupport.h
@@ -397,8 +397,8 @@ inet_pton   (
 
 char *
 strcpy (
-  char *restrict  strDest,
-  const char      *strSource
+  char        *strDest,
+  const char  *strSource
   );
 
 //
-- 
2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89108): https://edk2.groups.io/g/devel/message/89108
Mute This Topic: https://groups.io/mt/90578718/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-