X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=CryptoPkg%2FLibrary%2FIntrinsicLib%2FCopyMem.c;fp=CryptoPkg%2FLibrary%2FIntrinsicLib%2FCopyMem.c;h=7faf5a34d8c179f63b9121a2dd07e234a31ed59c;hp=e29b4918d2005f1c2ba4322b453d6c121df4b5c4;hb=98d8f194e5a646b25b3390825c92949a76689d75;hpb=b8993a34ae0069080138536249dc6a72bbd7b696 diff --git a/CryptoPkg/Library/IntrinsicLib/CopyMem.c b/CryptoPkg/Library/IntrinsicLib/CopyMem.c index e29b4918d2..7faf5a34d8 100644 --- a/CryptoPkg/Library/IntrinsicLib/CopyMem.c +++ b/CryptoPkg/Library/IntrinsicLib/CopyMem.c @@ -10,8 +10,21 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include +#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