From d88401cca9ff7640387a0d88d75de1e7d8fff294 Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Wed, 15 Apr 2015 19:28:11 +0000 Subject: MIPS64: Initial MIPS64 related change. With this change Breakpad can be compiled for MIPS64, but it is not yet functional. Patch by Gordana Cmiljanovic Review URL: https://breakpad.appspot.com/6824002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1446 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/linux/memory_mapped_file.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/common/linux') diff --git a/src/common/linux/memory_mapped_file.cc b/src/common/linux/memory_mapped_file.cc index 064326bb..592b66c8 100644 --- a/src/common/linux/memory_mapped_file.cc +++ b/src/common/linux/memory_mapped_file.cc @@ -54,6 +54,8 @@ MemoryMappedFile::~MemoryMappedFile() { Unmap(); } +#include + bool MemoryMappedFile::Map(const char* path, size_t offset) { Unmap(); @@ -62,7 +64,9 @@ bool MemoryMappedFile::Map(const char* path, size_t offset) { return false; } -#if defined(__x86_64__) || defined(__aarch64__) +#if defined(__x86_64__) || defined(__aarch64__) || \ + (defined(__mips__) && _MIPS_SIM == _ABI64) + struct kernel_stat st; if (sys_fstat(fd, &st) == -1 || st.st_size < 0) { #else @@ -83,7 +87,8 @@ bool MemoryMappedFile::Map(const char* path, size_t offset) { return true; } -#if defined(__x86_64__) || defined(__aarch64__) +#if defined(__x86_64__) || defined(__aarch64__) || \ + (defined(__mips__) && _MIPS_SIM == _ABI64) void* data = sys_mmap(NULL, file_len, PROT_READ, MAP_PRIVATE, fd, offset); #else if ((offset & 4095) != 0) { -- cgit v1.2.1