[PATCH] [Msan] Fix msan_test.cc inclusions to build the unit tests on FreeBSD
Viktor Kutuzov
vkutuzov at accesssoftek.com
Mon Dec 22 06:39:03 PST 2014
Hi kcc, samsonov, eugenis, emaste,
http://reviews.llvm.org/D6757
Files:
lib/msan/tests/msan_test.cc
Index: lib/msan/tests/msan_test.cc
===================================================================
--- lib/msan/tests/msan_test.cc
+++ lib/msan/tests/msan_test.cc
@@ -27,7 +27,6 @@
#include <stdio.h>
#include <wchar.h>
#include <math.h>
-#include <malloc.h>
#include <arpa/inet.h>
#include <dlfcn.h>
@@ -43,20 +42,26 @@
#include <sys/resource.h>
#include <sys/ioctl.h>
#include <sys/statvfs.h>
-#include <sys/sysinfo.h>
#include <sys/utsname.h>
#include <sys/mman.h>
-#include <sys/vfs.h>
#include <dirent.h>
#include <pwd.h>
#include <sys/socket.h>
#include <netdb.h>
#include <wordexp.h>
-#include <mntent.h>
-#include <netinet/ether.h>
#include <sys/ipc.h>
#include <sys/shm.h>
+#if !defined(__FreeBSD__)
+# include <malloc.h>
+# include <sys/sysinfo.h>
+# include <sys/vfs.h>
+# include <mntent.h>
+# include <netinet/ether.h>
+#else
+# include <netinet/in.h>
+#endif
+
#if defined(__i386__) || defined(__x86_64__)
# include <emmintrin.h>
# define MSAN_HAS_M128 1
@@ -973,7 +978,6 @@
ASSERT_EQ(0, res);
ASSERT_EQ(sizeof(client_sai), sz);
-
const char *s = "message text";
struct iovec iov;
iov.iov_base = (void *)s;
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6757.17556.patch
Type: text/x-patch
Size: 1167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141222/7418fae7/attachment.bin>
More information about the llvm-commits
mailing list