summaryrefslogtreecommitdiff
path: root/Cryptlib/Include/OpenSslSupport.h
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2021-08-04 13:24:11 -0400
committerPeter Jones <pjones@redhat.com>2021-09-07 17:05:04 -0400
commite13ac7386ea425c9222e05a2f9879d5af5cb91f6 (patch)
treeb4a9ee9785709a1ac74f1d8c3f431b481e8e960f /Cryptlib/Include/OpenSslSupport.h
parent0837d010a6ee140ff3cc770aadc89fbb015a7ca2 (diff)
downloadefi-boot-shim-e13ac7386ea425c9222e05a2f9879d5af5cb91f6.tar.gz
efi-boot-shim-e13ac7386ea425c9222e05a2f9879d5af5cb91f6.zip
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 <pjones@redhat.com>
Diffstat (limited to 'Cryptlib/Include/OpenSslSupport.h')
-rw-r--r--Cryptlib/Include/OpenSslSupport.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Cryptlib/Include/OpenSslSupport.h b/Cryptlib/Include/OpenSslSupport.h
index b97149e2..0c2fb8b0 100644
--- a/Cryptlib/Include/OpenSslSupport.h
+++ b/Cryptlib/Include/OpenSslSupport.h
@@ -262,11 +262,11 @@ extern FILE *stdout;
//
// Macros that directly map functions to BaseLib, BaseMemoryLib, and DebugLib functions
//
-#define memcpy(dest,source,count) ( {CopyMem(dest,source,(UINTN)(count)); dest; })
+#define memcpy(dest,source,count) ( {CopyMem(dest,(void *)source,(UINTN)(count)); dest; })
#define memset(dest,ch,count) SetMem(dest,(UINTN)(count),(UINT8)(ch))
#define memchr(buf,ch,count) ScanMem8((CHAR8 *)buf,(UINTN)(count),ch)
#define memcmp(buf1,buf2,count) (int)(CompareMem(buf1,buf2,(UINTN)(count)))
-#define memmove(dest,source,count) CopyMem(dest,source,(UINTN)(count))
+#define memmove(dest,source,count) CopyMem(dest,(void *)source,(UINTN)(count))
#define localtime(timer) NULL
#define assert(expression)
#define atoi(nptr) AsciiStrDecimalToUintn((const CHAR8 *)nptr)