summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/test/tsan/getline_nohang.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/test/tsan/getline_nohang.cc b/compiler-rt/test/tsan/getline_nohang.cc
index ce9d3588124..89afbe1a66a 100644
--- a/compiler-rt/test/tsan/getline_nohang.cc
+++ b/compiler-rt/test/tsan/getline_nohang.cc
@@ -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>
OpenPOWER on IntegriCloud