[PATCH] D51572: [Sanitizer] openbsd build fix
David CARLIER via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 1 11:47:20 PDT 2018
devnexen created this revision.
devnexen added a reviewer: krytarowski.
devnexen created this object with visibility "All Users".
Herald added subscribers: Sanitizers, llvm-commits, kubamracek.
sysctl has a different signature under OpenBSD
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D51572
Files:
lib/sanitizer_common/sanitizer_linux.cc
Index: lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- lib/sanitizer_common/sanitizer_linux.cc
+++ 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>
@@ -816,8 +817,13 @@
}
#if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_OPENBSD
+#if !SANITIZER_OPENBSD
int internal_sysctl(const int *name, unsigned int namelen, void *oldp,
uptr *oldlenp, const void *newp, uptr newlen) {
+#else
+int internal_sysctl(const int *name, unsigned int namelen, void *oldp,
+ uptr *oldlenp, void *newp, uptr newlen) {
+#endif
return sysctl(name, namelen, oldp, (size_t *)oldlenp, newp, (size_t)newlen);
}
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51572.163626.patch
Type: text/x-patch
Size: 828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180901/b88070b9/attachment.bin>
More information about the llvm-commits
mailing list