[compiler-rt] r289881 - Ifdef out utmp.h on Darwin to un-break the build after r289878 ([msan] Intercept getutent and friends).

Kuba Mracek via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 14:40:25 PST 2016


Author: kuba.brecka
Date: Thu Dec 15 16:40:24 2016
New Revision: 289881

URL: http://llvm.org/viewvc/llvm-project?rev=289881&view=rev
Log:
Ifdef out utmp.h on Darwin to un-break the build after r289878 ([msan] Intercept getutent and friends).


Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h?rev=289881&r1=289880&r2=289881&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h Thu Dec 15 16:40:24 2016
@@ -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

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc?rev=289881&r1=289880&r2=289881&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Thu Dec 15 16:40:24 2016
@@ -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




More information about the llvm-commits mailing list