[PATCH] D50760: [Sanitizer] Fix build openbsd
David CARLIER via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 15 03:28:48 PDT 2018
devnexen created this revision.
devnexen added reviewers: vitalybuka, krytarowski.
devnexen created this object with visibility "All Users".
Herald added subscribers: Sanitizers, llvm-commits, kubamracek, emaste.
- The alternative sys call exists on FreeBSD but not OpenBSD.
- Using specific OpenBSD's sys call.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D50760
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
@@ -489,8 +489,11 @@
int TgKill(pid_t pid, tid_t tid, int sig) {
#if SANITIZER_LINUX
return internal_syscall(SYSCALL(tgkill), pid, tid, sig);
-#else
+#elif SANITIZER_FREEBSD
return internal_syscall(SYSCALL(thr_kill2), pid, tid, sig);
+#elif SANITIZER_OPENBSD
+ (void)pid;
+ return internal_syscall(SYSCALL(thrkill), tid, sig, nullptr);
#endif
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50760.160760.patch
Type: text/x-patch
Size: 562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180815/c6d0fd35/attachment.bin>
More information about the llvm-commits
mailing list