aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/memory_mapped_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/linux/memory_mapped_file.cc')
-rw-r--r--src/common/linux/memory_mapped_file.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/linux/memory_mapped_file.cc b/src/common/linux/memory_mapped_file.cc
index 853cce57..0f0fcb2b 100644
--- a/src/common/linux/memory_mapped_file.cc
+++ b/src/common/linux/memory_mapped_file.cc
@@ -62,7 +62,7 @@ bool MemoryMappedFile::Map(const char* path) {
return false;
}
-#if defined(__x86_64__)
+#if defined(__x86_64__) || defined(__aarch64__)
struct kernel_stat st;
if (sys_fstat(fd, &st) == -1 || st.st_size < 0) {
#else
@@ -81,7 +81,7 @@ bool MemoryMappedFile::Map(const char* path) {
return true;
}
-#if defined(__x86_64__)
+#if defined(__x86_64__) || defined(__aarch64__)
void* data = sys_mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
#else
void* data = sys_mmap2(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);