[PATCH] [Msan] Fix the pthread_attr_get unit test to build on FreeBSD
Phabricator
reviews at reviews.llvm.org
Wed Feb 4 01:10:00 PST 2015
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7342
Files:
compiler-rt/trunk/lib/msan/tests/msan_test.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
Index: compiler-rt/trunk/lib/msan/tests/msan_test.cc
===================================================================
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc
@@ -73,9 +73,11 @@
# 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__)
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -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
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7342.19302.patch
Type: text/x-patch
Size: 1336 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150204/5ccffedb/attachment.bin>
More information about the llvm-commits
mailing list