From 62fcf0cf625d9f1e137cd556edb2717d2bc67c99 Mon Sep 17 00:00:00 2001 From: Viktor Kutuzov Date: Mon, 16 Feb 2015 13:26:32 +0000 Subject: [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 --- lib/msan/tests/msan_test.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/msan/tests/msan_test.cc') 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 # define f_namelen f_namemax // FreeBSD names this statfs field so. # define cpu_set_t cpuset_t +extern "C" { +// FreeBSD's 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__) -- cgit v1.2.3