[libc++] Fix missing availability check for visionOS in apple_availability.h (#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
This commit is contained in:
Louis Dionne 2026-03-19 11:14:12 -04:00 committed by GitHub
parent 70bb9e2452
commit e1aef9e227
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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__