[compiler-rt] [sanitizer_common] Updated build fix for newer NetBSD (PR #134742)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 7 14:50:48 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Brad Smith (brad0)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/134742.diff
1 Files Affected:
- (modified) compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp (+4-3)
``````````diff
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
index 9cc9da3d88c40..652c4a986ab72 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
@@ -30,11 +30,12 @@
# if SANITIZER_NETBSD
# // for __lwp_gettcb_fast() / __lwp_getprivate_fast()
+# define _RTLD_SOURCE
+# include <machine/mcontext.h>
+# undef _RTLD_SOURCE
# include <sys/param.h>
-# if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 1099001200)
+# if __NetBSD_Version__ >= 1099001200
# include <machine/lwp_private.h>
-# else
-# define _RTLD_SOURCE
# endif
# endif
``````````
</details>
https://github.com/llvm/llvm-project/pull/134742
More information about the llvm-commits
mailing list