Merge pull request #172 from cscd98/mingw-fixes-latest

Fix compilation under MINGW
This commit is contained in:
木头云 2026-01-23 10:25:42 +08:00 committed by GitHub
commit 6562e40453
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,7 +36,7 @@ void *new_delete_resource::allocate(std::size_t bytes, std::size_t alignment) no
log.error("invalid bytes = ", bytes, ", alignment = ", alignment);
return nullptr;
}
#if defined(LIBIPC_CPP_17) && !defined(LIBIPC_CC_MSVC)
#if defined(LIBIPC_CPP_17) && !defined(LIBIPC_CC_MSVC) && !defined(__MINGW32__)
/// \see https://en.cppreference.com/w/cpp/memory/c/aligned_alloc
/// \remark The size parameter must be an integral multiple of alignment.
return std::aligned_alloc(alignment, ipc::round_up(bytes, alignment));