diff options
Diffstat (limited to 'src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/IntrinsicLib/CopyMem.c')
-rw-r--r-- | src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/IntrinsicLib/CopyMem.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/IntrinsicLib/CopyMem.c b/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/IntrinsicLib/CopyMem.c new file mode 100644 index 00000000..d196296a --- /dev/null +++ b/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/IntrinsicLib/CopyMem.c @@ -0,0 +1,30 @@ +/** @file + Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based + Cryptographic Library. + +Copyright (c) 2010, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include <Base.h> +#include <Library/BaseMemoryLib.h> + +#if defined(__clang__) && !defined(__APPLE__) + +/* Copies bytes between buffers */ +static __attribute__((__used__)) +void * __memcpy (void *dest, const void *src, unsigned int count) +{ + return CopyMem (dest, src, (UINTN)count); +} +__attribute__((__alias__("__memcpy"))) +void * memcpy (void *dest, const void *src, unsigned int count); + +#else +/* Copies bytes between buffers */ +void * memcpy (void *dest, const void *src, unsigned int count) +{ + return CopyMem (dest, src, (UINTN)count); +} +#endif |