summaryrefslogtreecommitdiff
path: root/lib/msan/tests/msan_test.cc
diff options
context:
space:
mode:
authorViktor Kutuzov <vkutuzov@accesssoftek.com>2015-02-16 13:26:32 +0000
committerViktor Kutuzov <vkutuzov@accesssoftek.com>2015-02-16 13:26:32 +0000
commit62fcf0cf625d9f1e137cd556edb2717d2bc67c99 (patch)
treed4643de015d3b14d40162a83ca7c29d80618b085 /lib/msan/tests/msan_test.cc
parentda74f73216f2f22637c56fe3a5101bc681c0f68e (diff)
[Msan] Make unit tests that use mempcpy() passing on FreeBSD
Differential Revision: http://reviews.llvm.org/D7588 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@229388 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/tests/msan_test.cc')
-rw-r--r--lib/msan/tests/msan_test.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/msan/tests/msan_test.cc b/lib/msan/tests/msan_test.cc
index f6b4bfdde..1fc5e8c50 100644
--- a/lib/msan/tests/msan_test.cc
+++ b/lib/msan/tests/msan_test.cc
@@ -80,6 +80,12 @@ int shmdt(const void *);
# include <net/ethernet.h>
# define f_namelen f_namemax // FreeBSD names this statfs field so.
# define cpu_set_t cpuset_t
+extern "C" {
+// FreeBSD's <ssp/string.h> defines mempcpy() to be a macro expanding into
+// a __builtin___mempcpy_chk() call, but since Msan RTL defines it as an
+// ordinary function, we can declare it here to complete the tests.
+void *mempcpy(void *dest, const void *src, size_t n);
+}
#endif
#if defined(__i386__) || defined(__x86_64__)