diff options
author | Danny Lin <danny@kdrag0n.dev> | 2021-03-09 14:39:13 -0800 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2022-05-11 18:07:32 +0800 |
commit | db6107dd6d90c6148d68fcd1138b8b521bdbbd45 (patch) | |
tree | 541ac98248c36c671b21df279efcd529e9ebd617 | |
parent | f2712f4a8f038a7fb4df2790f4c3b7e3ed9e219b (diff) |
mimalloc: Hide C++ STL allocator implementation on Android
When mimalloc is used as the system allocator and compiled as part of
Bionic libc on Android, this header is included in C++ code without the
STL.
Hide the std::allocator interface to fix the build errors.
Change-Id: I2f26844296911547b407ed39e2f345d49471fa17
-rw-r--r-- | include/mimalloc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mimalloc.h b/include/mimalloc.h index c752ac2..c69e4c5 100644 --- a/include/mimalloc.h +++ b/include/mimalloc.h @@ -397,7 +397,7 @@ mi_decl_nodiscard mi_decl_export void* mi_new_reallocn(void* p, size_t newcount, // Implement the C++ std::allocator interface for use in STL containers. // (note: see `mimalloc-new-delete.h` for overriding the new/delete operators globally) // --------------------------------------------------------------------------------------------- -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(ANDROID) #include <cstddef> // std::size_t #include <cstdint> // PTRDIFF_MAX |