diff options
author | mark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-04-03 16:38:53 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-04-03 16:38:53 +0000 |
commit | 4f291f0307ae6f33f70f578cbcd4450923692412 (patch) | |
tree | bd671ae6f9fcf46d1764c2deae9d691325bbbe62 /src/common/linux/memory_mapped_file.cc | |
parent | Remove redundant include of CPP specific header files (diff) | |
download | breakpad-4f291f0307ae6f33f70f578cbcd4450923692412.tar.xz |
Changes to get the breakpad client compiling and running on Android using
ndk-7b.
Patch by Carlos Valdivia <carlosvaldivia@google.com>
Review URL: https://breakpad.appspot.com/363001/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@945 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux/memory_mapped_file.cc')
-rw-r--r-- | src/common/linux/memory_mapped_file.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/linux/memory_mapped_file.cc b/src/common/linux/memory_mapped_file.cc index 6f450bd3..32fc3b18 100644 --- a/src/common/linux/memory_mapped_file.cc +++ b/src/common/linux/memory_mapped_file.cc @@ -34,6 +34,9 @@ #include <fcntl.h> #include <sys/mman.h> +#if defined(__ANDROID__) +#include <sys/stat.h> +#endif #include <unistd.h> #include "common/memory_range.h" @@ -59,7 +62,10 @@ bool MemoryMappedFile::Map(const char* path) { return false; } -#if defined(__x86_64__) +#if defined(__ANDROID__) + struct stat st; + if (fstat(fd, &st) != 0) { +#elif defined(__x86_64__) struct kernel_stat st; if (sys_fstat(fd, &st) == -1 || st.st_size < 0) { #else |