[libc++] Fix build on macOS older than 10.15.

* This was introduced in D99515 that added -Wundef flag. CI run on macOS 10.15 and this problem wasn't caught before.
This commit is contained in:
Marek Kurdej 2021-04-02 10:31:18 +02:00
parent 2388aae401
commit 49e5a896d1
1 changed files with 4 additions and 4 deletions

View File

@ -393,10 +393,10 @@
# elif defined(__APPLE__)
// timespec_get and aligned_alloc were introduced in macOS 10.15 and
// aligned releases
# if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500 || \
__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000 || \
__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000 || \
__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000)
# if ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000))
# define _LIBCPP_HAS_ALIGNED_ALLOC
# define _LIBCPP_HAS_TIMESPEC_GET
# endif