aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2026-04-25 15:20:27 +0000
committerDimitry Andric <dim@FreeBSD.org>2026-05-29 22:59:37 +0000
commitec6797818bf2f35c95422a4be398ca903ce27657 (patch)
tree6be7164b46be4b7e54d740b43c150e433e8eb879
parent0b78483e6802652c0a4ebc027988236a088f3a7a (diff)
Fix up builds on Linux hosts after llvm 21.1.8 merge
This is because contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc attempts to use pthread_get_name_np(3) and pthread_set_name_np(3), which are not defined on Linux. Reported by: ivy PR: 292067 MFC after: 1 month (cherry picked from commit b6d823e39072daae9df4b47a15ea7142b7a55f1a)
-rw-r--r--lib/clang/include/llvm/Config/config.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h
index e504ac8f13bb..0aea32fa9dce 100644
--- a/lib/clang/include/llvm/Config/config.h
+++ b/lib/clang/include/llvm/Config/config.h
@@ -114,10 +114,14 @@
#define HAVE_PTHREAD_SETNAME_NP 1
/* Define to 1 if you have the `pthread_get_name_np' function. */
+#if !defined(__linux__)
#define HAVE_PTHREAD_GET_NAME_NP 1
+#endif
/* Define to 1 if you have the `pthread_set_name_np' function. */
+#if !defined(__linux__)
#define HAVE_PTHREAD_SET_NAME_NP 1
+#endif
/* Define to 1 if you have the <mach/mach.h> header file. */
#if __has_include(<mach/mach.h>)