[compiler-rt] [sanitizer_common] Updated build fix for newer NetBSD (PR #134742)
Brad Smith via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 7 14:50:06 PDT 2025
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/134742
None
>From aac1d144f17d2d110cfb977168d08fe01f2b96e2 Mon Sep 17 00:00:00 2001
From: Thomas Klausner <wiz at gatalith.at>
Date: Mon, 7 Apr 2025 17:46:53 -0400
Subject: [PATCH] [sanitizer_common] Updated build fix for newer NetBSD
---
.../lib/sanitizer_common/sanitizer_linux_libcdep.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
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
More information about the llvm-commits
mailing list