Skip to content

Commit 3b70932

Browse files
committed
Fix compilation on android
Fall back to the default implementation of aligned_ttmem_alloc, which was introduced as part of 39437f4 Fixes #2524 No functional change.
1 parent a910ba7 commit 3b70932

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/misc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ typedef bool(*fun3_t)(HANDLE, CONST GROUP_AFFINITY*, PGROUP_AFFINITY);
4747
#include <sstream>
4848
#include <vector>
4949

50-
#ifdef __linux__
50+
#if defined(__linux__) && !defined(__ANDROID__)
5151
#include <stdlib.h>
5252
#include <sys/mman.h>
5353
#endif
@@ -297,7 +297,7 @@ void prefetch(void* addr) {
297297
/// aligned_ttmem_alloc will return suitably aligned memory, and if possible use large pages.
298298
/// The returned pointer is the aligned one, while the mem argument is the one that needs to be passed to free.
299299
/// With c++17 some of this functionality can be simplified.
300-
#ifdef __linux__
300+
#if defined(__linux__) && !defined(__ANDROID__)
301301

302302
void* aligned_ttmem_alloc(size_t allocSize, void** mem) {
303303

0 commit comments

Comments
 (0)