0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-12 00:10:52 +00:00
termux-packages/packages/libllvm/mlir-lib-ExecutionEngine-CRunnerUtils.cpp.patch
2023-03-28 01:40:46 +05:30

14 lines
668 B
Diff

diff --git a/mlir/lib/ExecutionEngine/CRunnerUtils.cpp b/mlir/lib/ExecutionEngine/CRunnerUtils.cpp
index e5e0d6f94f14..6be48c3c590b 100644
--- a/mlir/lib/ExecutionEngine/CRunnerUtils.cpp
+++ b/mlir/lib/ExecutionEngine/CRunnerUtils.cpp
@@ -127,7 +127,7 @@ extern "C" void *mlirAlloc(uint64_t size) { return malloc(size); }
extern "C" void *mlirAlignedAlloc(uint64_t alignment, uint64_t size) {
#ifdef _WIN32
return _aligned_malloc(size, alignment);
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__ANDROID__)
// aligned_alloc was added in MacOS 10.15. Fall back to posix_memalign to also
// support older versions.
void *result = nullptr;