From 3b70932b0dee0cf1817baf0daa43ac92e18003c4 Mon Sep 17 00:00:00 2001 From: Joost VandeVondele Date: Tue, 28 Jan 2020 16:17:52 +0100 Subject: [PATCH 1/1] Fix compilation on android Fall back to the default implementation of aligned_ttmem_alloc, which was introduced as part of 39437f4e55aaa26ef9f0d5a1c762e560e9ffde32 Fixes #2524 No functional change. --- src/misc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc.cpp b/src/misc.cpp index 0bae9f1e..cf18d2e2 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -47,7 +47,7 @@ typedef bool(*fun3_t)(HANDLE, CONST GROUP_AFFINITY*, PGROUP_AFFINITY); #include #include -#ifdef __linux__ +#if defined(__linux__) && !defined(__ANDROID__) #include #include #endif @@ -297,7 +297,7 @@ void prefetch(void* addr) { /// aligned_ttmem_alloc will return suitably aligned memory, and if possible use large pages. /// The returned pointer is the aligned one, while the mem argument is the one that needs to be passed to free. /// With c++17 some of this functionality can be simplified. -#ifdef __linux__ +#if defined(__linux__) && !defined(__ANDROID__) void* aligned_ttmem_alloc(size_t allocSize, void** mem) { -- 2.39.2