mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:16:13 +00:00
Fix FileModificationTime for Android
Traditional NDK headers provide the nanoseconds field of modification time as st_mtime_nsec, rather than contained in a timespec st_mtim. Unified headers do provide the timespec st_mtim. Bug: crashpad:206 Change-Id: I701ac2d5e357a13855a2a674f1355f2ea125ee4e Reviewed-on: https://chromium-review.googlesource.com/760618 Commit-Queue: Joshua Peraza <jperaza@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
6f6f8a144d
commit
13e17bf90f
@ -34,6 +34,10 @@ bool FileModificationTime(const base::FilePath& path, timespec* mtime) {
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
*mtime = st.st_mtimespec;
|
||||
#elif defined(OS_ANDROID)
|
||||
// This is needed to compile with traditional NDK headers.
|
||||
mtime->tv_sec = st.st_mtime;
|
||||
mtime->tv_nsec = st.st_mtime_nsec;
|
||||
#else
|
||||
*mtime = st.st_mtim;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user