[libcxx-commits] [libcxx] [libc++] Fix missing availability check for visionOS in apple_availability.h (PR #187015)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 17 06:03:47 PDT 2026
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/187015
Without this, we were assuming that __ulock was unavailable on visionOS and falling back to the manual implementation, when in reality we can always rely on the existence of ulock.
Fixes #186467
>From 6eccd927e336962e2cdc31a9b0a0d5c625176eb8 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 16 Mar 2026 18:09:18 -0400
Subject: [PATCH] [libc++] Fix missing availability check for visionOS in
apple_availability.h
Without this, we were assuming that __ulock was unavailable on visionOS
and falling back to the manual implementation, when in reality we can
always rely on the existence of ulock.
Fixes #186467
---
libcxx/src/include/apple_availability.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libcxx/src/include/apple_availability.h b/libcxx/src/include/apple_availability.h
index fc2ad15065416..715e187546923 100644
--- a/libcxx/src/include/apple_availability.h
+++ b/libcxx/src/include/apple_availability.h
@@ -27,6 +27,10 @@
# if __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000
# define _LIBCPP_USE_ULOCK
# endif
+# elif defined(__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__) && __is_target_os(visionos)
+# if __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ >= 10000
+# define _LIBCPP_USE_ULOCK
+# endif
# endif // __ENVIRONMENT_.*_VERSION_MIN_REQUIRED__
#endif // __APPLE__
More information about the libcxx-commits
mailing list