diff --git a/src/core/support/wrap_memcpy.c b/src/core/support/wrap_memcpy.c
index b191d0396be5637d05ca17a01ef0da9b5b653911..6cedcaf1660fc8e878409a2d03c10f9b529bcb3f 100644
--- a/src/core/support/wrap_memcpy.c
+++ b/src/core/support/wrap_memcpy.c
@@ -39,8 +39,11 @@
  * Enable by setting LDFLAGS=-Wl,-wrap,memcpy when linking.
  */
 
+#ifdef __linux__
 __asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
 
 void *__wrap_memcpy(void *destination, const void *source, size_t num) {
   return memcpy(destination, source, num);
 }
+#endif
+