Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ compiler-rt/trunk/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 && !SI_MAC
+#define SANITIZER_INTERCEPT_UTMP SI_NOT_WINDOWS && !SI_MAC && !SI_FREEBSD
 #define SANITIZER_INTERCEPT_UTMPX SI_LINUX_NOT_ANDROID || SI_MAC || SI_FREEBSD
 
 #endif  // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -862,7 +862,9 @@
   extern int shmctl_shm_stat;
 #endif
 
+#if !SANITIZER_MAC && !SANITIZER_FREEBSD
   extern unsigned struct_utmp_sz;
+#endif
 #if !SANITIZER_ANDROID
   extern unsigned struct_utmpx_sz;
 #endif
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -51,7 +51,7 @@
 #include <termios.h>
 #include <time.h>
 #include <wchar.h>
-#if !SANITIZER_MAC
+#if !SANITIZER_MAC && !SANITIZER_FREEBSD
 #include <utmp.h>
 #endif
 
@@ -288,7 +288,7 @@
   int shmctl_shm_stat = (int)SHM_STAT;
 #endif
 
-#if !SANITIZER_MAC
+#if !SANITIZER_MAC && !SANITIZER_FREEBSD
   unsigned struct_utmp_sz = sizeof(struct utmp);
 #endif
 #if !SANITIZER_ANDROID