[compiler-rt] r219482 - [Tsan] Fix the getline_nohang.cc test to build on FreeBSD

Viktor Kutuzov vkutuzov at accesssoftek.com
Fri Oct 10 00:07:26 PDT 2014


Author: vkutuzov
Date: Fri Oct 10 02:07:26 2014
New Revision: 219482

URL: http://llvm.org/viewvc/llvm-project?rev=219482&view=rev
Log:
[Tsan] Fix the getline_nohang.cc test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D5666

Modified:
    compiler-rt/trunk/test/tsan/getline_nohang.cc

Modified: compiler-rt/trunk/test/tsan/getline_nohang.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/getline_nohang.cc?rev=219482&r1=219481&r2=219482&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/getline_nohang.cc (original)
+++ compiler-rt/trunk/test/tsan/getline_nohang.cc Fri Oct 10 02:07:26 2014
@@ -2,6 +2,10 @@
 
 // Make sure TSan doesn't deadlock on a file stream lock at program shutdown.
 // See https://code.google.com/p/thread-sanitizer/issues/detail?id=47
+#ifdef __FreeBSD__
+#define _WITH_GETLINE  // to declare getline()
+#endif
+
 #include <pthread.h>
 #include <stdio.h>
 #include <unistd.h>





More information about the llvm-commits mailing list