[PATCH] D51572: [Sanitizer] openbsd build fix

David CARLIER via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 2 02:09:56 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL341285: [Sanitizer] openbsd build fix (authored by devnexen, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D51572?vs=163628&id=163640#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D51572

Files:
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc


Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
@@ -69,6 +69,7 @@
 #endif
 #if SANITIZER_OPENBSD
 #include <sys/futex.h>
+#include <sys/sysctl.h>
 #endif
 #include <unistd.h>
 
@@ -818,7 +819,12 @@
 #if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_OPENBSD
 int internal_sysctl(const int *name, unsigned int namelen, void *oldp,
                     uptr *oldlenp, const void *newp, uptr newlen) {
+#if SANITIZER_OPENBSD
+  return sysctl(name, namelen, oldp, (size_t *)oldlenp, (void *)newp,
+	(size_t)newlen);
+#else
   return sysctl(name, namelen, oldp, (size_t *)oldlenp, newp, (size_t)newlen);
+#endif
 }
 #endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51572.163640.patch
Type: text/x-patch
Size: 833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180902/e7b2ea5c/attachment.bin>


More information about the llvm-commits mailing list