]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Two fixes for Darwin 'make check'
authorPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 17 Mar 2021 08:12:21 +0000 (09:12 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 17 Mar 2021 08:12:21 +0000 (09:12 +0100)
mempcpy is not available on Darwin, so make it conditional like Solaris.

also sys/auxv.h does not exist so make including it conditional.

dhat/tests/copy.c
tests/arm64_features.c

index dd94ec19f81ad557dcc757c5c36e9a42c0e7cc46..25bb221ecf9697875911b4ff429ff5051c3d3c43 100644 (file)
@@ -43,7 +43,7 @@ void f(char* a, char* b, wchar_t* wa, wchar_t* wb) {
    memcpy (a, b, 1000); // Redirects to memmove
    memcpy (a, b, 1000); // Redirects to memmove
    memmove(a, b, 1000);
-#if defined(VGO_solaris)
+#if defined(VGO_solaris) || defined(VGO_darwin)
    memcpy(a, b, 1000);
 #else
    mempcpy(a, b, 1000);
index 01b12f784af403739cfd263fb629de334a48da23..916a4e24dd23b8661d491fcf740e8c1f01b925bb 100644 (file)
@@ -1,7 +1,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#if !defined(__APPLE__)
 #include <sys/auxv.h>
+#endif
 
 // This file determines arm64 features a processor supports.
 // Arm processors do not have a x86-like cpuinfo instruction. Instead the