Index: compiler-rt/trunk/test/tsan/getline_nohang.cc =================================================================== --- compiler-rt/trunk/test/tsan/getline_nohang.cc +++ compiler-rt/trunk/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 #include #include