[sanitizer] Fix FreeBSD build of sanitizer_common.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 28 Jul 2015 00:29:47 +0000 (00:29 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 28 Jul 2015 00:29:47 +0000 (00:29 +0000)
Broken in r243051.

llvm-svn: 243359

compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc

index 5417771..f43a899 100644 (file)
@@ -522,6 +522,7 @@ uptr GetRSS() {
 // 64-bit Android targets don't provide the deprecated __android_log_write.
 // Starting with the L release, syslog() works and is preferable to
 // __android_log_write.
+#if SANITIZER_LINUX
 #if SANITIZER_ANDROID && __ANDROID_API__ < 21
 static atomic_uint8_t android_log_initialized;
 
@@ -562,6 +563,7 @@ void WriteToSyslog(const char *buffer) {
   } while (q);
   InternalFree(copy);
 }
+#endif  // SANITIZER_LINUX
 
 }  // namespace __sanitizer