From 9226279daa6f38a060908080e3007bfb43b4694f Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Thu, 11 May 2017 02:01:05 +0000 Subject: Don't use posix_memalign under MinGW llvm-svn: 302755 --- libcxxabi/src/stdlib_new_delete.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcxxabi') diff --git a/libcxxabi/src/stdlib_new_delete.cpp b/libcxxabi/src/stdlib_new_delete.cpp index ffd174c..0e85f6ad 100644 --- a/libcxxabi/src/stdlib_new_delete.cpp +++ b/libcxxabi/src/stdlib_new_delete.cpp @@ -146,7 +146,7 @@ operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC if (static_cast(alignment) < sizeof(void*)) alignment = std::align_val_t(sizeof(void*)); void* p; -#if defined(_LIBCPP_MSVCRT) +#if defined(_LIBCPP_WIN32API) while ((p = _aligned_malloc(size, static_cast(alignment))) == nullptr) #else while (::posix_memalign(&p, static_cast(alignment), size) != 0) @@ -219,7 +219,7 @@ void operator delete(void* ptr, std::align_val_t) _NOEXCEPT { if (ptr) -#if defined(_LIBCPP_MSVCRT) +#if defined(_LIBCPP_WIN32API) ::_aligned_free(ptr); #else ::free(ptr); -- cgit v1.1