Skip to content

Commit 9fdac84

Browse files
brad00-wiz-0
andauthored
[sanitizer_common] Fix building with NetBSD 10.99.12 or newer (#134708)
NetBSD/src@16543c4 __lwp_getprivate_fast() was moved to a new arch-specific header file. Closes: #125566 Co-authored-by: Thomas Klausner <[email protected]>
1 parent 19dbde0 commit 9fdac84

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@
2929
# include "sanitizer_solaris.h"
3030

3131
# if SANITIZER_NETBSD
32-
# define _RTLD_SOURCE // for __lwp_gettcb_fast() / __lwp_getprivate_fast()
32+
# // for __lwp_gettcb_fast() / __lwp_getprivate_fast()
33+
# include <sys/param.h>
34+
# if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 1099001200)
35+
# include <machine/lwp_private.h>
36+
# else
37+
# define _RTLD_SOURCE
38+
# endif
3339
# endif
3440

3541
# include <dlfcn.h> // for dlsym()

0 commit comments

Comments
 (0)