summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuba Mracek <mracek@apple.com>2016-12-15 22:40:24 +0000
committerKuba Mracek <mracek@apple.com>2016-12-15 22:40:24 +0000
commit0bd0fe4e7d3fc3d4c66dc32362c0cde892939600 (patch)
tree96d320ca375ec7a6db92e1a7ba37f6d2b2204bbe
parent8f8cdd00dab0c56011806eb0e2fe211364be71f7 (diff)
downloadbcm5719-llvm-0bd0fe4e7d3fc3d4c66dc32362c0cde892939600.tar.gz
bcm5719-llvm-0bd0fe4e7d3fc3d4c66dc32362c0cde892939600.zip
Ifdef out utmp.h on Darwin to un-break the build after r289878 ([msan] Intercept getutent and friends).
llvm-svn: 289881
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h2
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc4
2 files changed, 5 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index 61a33961ff1..f3752273306 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -313,7 +313,7 @@
#define SANITIZER_INTERCEPT___LXSTAT SANITIZER_INTERCEPT___XSTAT
#define SANITIZER_INTERCEPT___LXSTAT64 SI_LINUX_NOT_ANDROID
-#define SANITIZER_INTERCEPT_UTMP SI_NOT_WINDOWS
+#define SANITIZER_INTERCEPT_UTMP SI_NOT_WINDOWS && !SI_MAC
#define SANITIZER_INTERCEPT_UTMPX SI_LINUX_NOT_ANDROID || SI_MAC || SI_FREEBSD
#endif // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
index 6a84f055d8d..31d80b9008c 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -51,7 +51,9 @@
#include <termios.h>
#include <time.h>
#include <wchar.h>
+#if !SANITIZER_MAC
#include <utmp.h>
+#endif
#if !SANITIZER_IOS
#include <net/route.h>
@@ -286,7 +288,9 @@ namespace __sanitizer {
int shmctl_shm_stat = (int)SHM_STAT;
#endif
+#if !SANITIZER_MAC
unsigned struct_utmp_sz = sizeof(struct utmp);
+#endif
#if !SANITIZER_ANDROID
unsigned struct_utmpx_sz = sizeof(struct utmpx);
#endif
OpenPOWER on IntegriCloud