Skip to content

Commit

Permalink
[libc++] Don't use aligned_alloc on iOS versions before 13 (#110315)
Browse files Browse the repository at this point in the history
There's a check here to not use aligned_alloc on macOS versions before
10.15, this patch adds an equivalent check that tests for iOS 13.
  • Loading branch information
Un1q32 authored and pull[bot] committed Oct 10, 2024
1 parent 7938367 commit 3101839
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,10 @@ typedef __char32_t char32_t;
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500)
# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC
# endif
# if (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \
__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000)
# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC
# endif
# elif defined(__ANDROID__) && __ANDROID_API__ < 28
// Android only provides aligned_alloc when targeting API 28 or higher.
# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC
Expand Down

0 comments on commit 3101839

Please sign in to comment.