Skip to content

Commit 6389974

Browse files
authored
[libc++] Don't use aligned_alloc on iOS versions before 13 (#110315)
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.
1 parent 48dc4d3 commit 6389974

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libcxx/include/__config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,10 @@ typedef __char32_t char32_t;
649649
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500)
650650
# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC
651651
# endif
652+
# if (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \
653+
__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000)
654+
# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC
655+
# endif
652656
# elif defined(__ANDROID__) && __ANDROID_API__ < 28
653657
// Android only provides aligned_alloc when targeting API 28 or higher.
654658
# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC

0 commit comments

Comments
 (0)