]> git.proxmox.com Git - rustc.git/blobdiff - src/compiler-rt/test/tsan/getline_nohang.cc
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / compiler-rt / test / tsan / getline_nohang.cc
index ce9d35881245548efaf7f0673790189653c33952..89afbe1a66a8f6a0a89b83b2e056eeedb167ac59 100644 (file)
@@ -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>