[PATCH] D27902: Fix build breakage on FreeBSD after rL289878/rL289881

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 18 12:05:48 PST 2016


dim created this revision.
dim added reviewers: eugenis, kubabrecka, emaste.
dim added a subscriber: llvm-commits.

After https://reviews.llvm.org/rL289878/https://reviews.llvm.org/rL289881, the build on FreeBSD is broken, because
sanitizer_platform_limits_posix.cc attempts to include <utmp.h> and use
`struct utmp`, neither of which are supported anymore on FreeBSD.

Fix this by adding `&& !SANITIZER_FREEBSD` in two places.


https://reviews.llvm.org/D27902

Files:
  lib/sanitizer_common/sanitizer_platform_limits_posix.cc


Index: lib/sanitizer_common/sanitizer_platform_limits_posix.cc
===================================================================
--- lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27902.81887.patch
Type: text/x-patch
Size: 635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161218/5e202e70/attachment.bin>


More information about the llvm-commits mailing list