[sanitizer] Guard call to internal_lseek when SANITIZER_MAC is true
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Mon, 18 Jun 2018 13:53:51 +0000 (13:53 +0000)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Mon, 18 Jun 2018 13:53:51 +0000 (13:53 +0000)
r334881 breaks macOS bots because internal_lseek is not defined (neither
used on macOS):
http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/46240/consoleFull.

See discussion from r334881: https://reviews.llvm.org/rL334881

llvm-svn: 334944

compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cc

index 715da48..2f61601 100644 (file)
@@ -113,7 +113,7 @@ TEST(SanitizerCommon, FileOps) {
 
   fd = OpenFile(tmpfile, WrOnly);
   ASSERT_NE(fd, kInvalidFd);
-#if SANITIZER_POSIX
+#if SANITIZER_POSIX && !SANITIZER_MAC
   EXPECT_EQ(internal_lseek(fd, 0, SEEK_END), 0u);
 #endif
   uptr bytes_written = 0;