[compiler-rt] r228125 - [Msan] Fix the pthread_attr_get unit test to build on FreeBSD
Viktor Kutuzov
vkutuzov at accesssoftek.com
Wed Feb 4 01:08:00 PST 2015
Author: vkutuzov
Date: Wed Feb 4 03:08:00 2015
New Revision: 228125
URL: http://llvm.org/viewvc/llvm-project?rev=228125&view=rev
Log:
[Msan] Fix the pthread_attr_get unit test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D7342
Modified:
compiler-rt/trunk/lib/msan/tests/msan_test.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
Modified: compiler-rt/trunk/lib/msan/tests/msan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/msan_test.cc?rev=228125&r1=228124&r2=228125&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc (original)
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc Wed Feb 4 03:08:00 2015
@@ -73,9 +73,11 @@ int shmdt(const void *);
# include <netinet/ether.h>
#else
# include <netinet/in.h>
+# include <pthread_np.h>
# include <sys/uio.h>
# include <sys/mount.h>
# define f_namelen f_namemax // FreeBSD names this statfs field so.
+# define cpu_set_t cpuset_t
#endif
#if defined(__i386__) || defined(__x86_64__)
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h?rev=228125&r1=228124&r2=228125&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h Wed Feb 4 03:08:00 2015
@@ -179,7 +179,7 @@
#define SANITIZER_INTERCEPT_RANDOM_R SI_LINUX_NOT_ANDROID
#define SANITIZER_INTERCEPT_PTHREAD_ATTR_GET SI_NOT_WINDOWS
#define SANITIZER_INTERCEPT_PTHREAD_ATTR_GETINHERITSCHED \
- SI_MAC || SI_LINUX_NOT_ANDROID
+ SI_FREEBSD || SI_MAC || SI_LINUX_NOT_ANDROID
#define SANITIZER_INTERCEPT_PTHREAD_ATTR_GETAFFINITY_NP SI_LINUX_NOT_ANDROID
#define SANITIZER_INTERCEPT_PTHREAD_MUTEXATTR_GETPSHARED SI_NOT_WINDOWS
#define SANITIZER_INTERCEPT_PTHREAD_MUTEXATTR_GETTYPE SI_NOT_WINDOWS
More information about the llvm-commits
mailing list