From e13ac7386ea425c9222e05a2f9879d5af5cb91f6 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 4 Aug 2021 13:24:11 -0400 Subject: Make CopyMem() work with EFI's declaration EFI_BOOT_SERVICES includes CopyMem() and SetMem() functions which are marked EFIAPI, and in the case of CopyMem() does not mark the source argument as CONST. This patch makes all our invocations work with that, so (once gnu-efi's implementation is fixed to match) we can use the existing implementation as the implementation in a mock EFI_BOOT_SERVICES. Signed-off-by: Peter Jones --- Cryptlib/Hash/CryptSha512.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Cryptlib/Hash/CryptSha512.c') diff --git a/Cryptlib/Hash/CryptSha512.c b/Cryptlib/Hash/CryptSha512.c index 3ce372a0..16063b23 100644 --- a/Cryptlib/Hash/CryptSha512.c +++ b/Cryptlib/Hash/CryptSha512.c @@ -93,7 +93,7 @@ Sha384Duplicate ( return FALSE; } - CopyMem (NewSha384Context, Sha384Context, sizeof (SHA512_CTX)); + CopyMem (NewSha384Context, (void *)Sha384Context, sizeof (SHA512_CTX)); return TRUE; } @@ -308,7 +308,7 @@ Sha512Duplicate ( return FALSE; } - CopyMem (NewSha512Context, Sha512Context, sizeof (SHA512_CTX)); + CopyMem (NewSha512Context, (void *)Sha512Context, sizeof (SHA512_CTX)); return TRUE; } -- cgit v1.2.3