mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2026-02-06 17:59:48 +08:00
mingw: fix std::aligned_alloc usage
This commit is contained in:
parent
46be39b2b1
commit
0c7568a49c
@ -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);
|
log.error("invalid bytes = ", bytes, ", alignment = ", alignment);
|
||||||
return nullptr;
|
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
|
/// \see https://en.cppreference.com/w/cpp/memory/c/aligned_alloc
|
||||||
/// \remark The size parameter must be an integral multiple of alignment.
|
/// \remark The size parameter must be an integral multiple of alignment.
|
||||||
return std::aligned_alloc(alignment, ipc::round_up(bytes, alignment));
|
return std::aligned_alloc(alignment, ipc::round_up(bytes, alignment));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user