]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/IntrinsicLib/CopyMem.c
CryptoPkg/IntrinsicLib: Fix CLANG38 IA32 build problem
[mirror_edk2.git] / CryptoPkg / Library / IntrinsicLib / CopyMem.c
index e29b4918d2005f1c2ba4322b453d6c121df4b5c4..7faf5a34d8c179f63b9121a2dd07e234a31ed59c 100644 (file)
@@ -10,8 +10,21 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Base.h>\r
 #include <Library/BaseMemoryLib.h>\r
 \r
+#if defined(__clang__) && !defined(__APPLE__)\r
+\r
+/* Copies bytes between buffers */\r
+static __attribute__((__used__))\r
+void * __memcpy (void *dest, const void *src, unsigned int count)\r
+{\r
+  return CopyMem (dest, src, (UINTN)count);\r
+}\r
+__attribute__((__alias__("__memcpy")))\r
+void * memcpy (void *dest, const void *src, unsigned int count);\r
+\r
+#else\r
 /* Copies bytes between buffers */\r
 void * memcpy (void *dest, const void *src, unsigned int count)\r
 {\r
   return CopyMem (dest, src, (UINTN)count);\r
 }\r
+#endif\r