| Index: third_party/crashpad/crashpad/util/file/file_io_posix.cc
|
| diff --git a/third_party/crashpad/crashpad/util/file/file_io_posix.cc b/third_party/crashpad/crashpad/util/file/file_io_posix.cc
|
| index ce08a3960c5b39c591efa9c599670129bfcd839b..30eae539ac60e9f235ea62ed12cb971ad827d55b 100644
|
| --- a/third_party/crashpad/crashpad/util/file/file_io_posix.cc
|
| +++ b/third_party/crashpad/crashpad/util/file/file_io_posix.cc
|
| @@ -16,6 +16,7 @@
|
|
|
| #include <fcntl.h>
|
| #include <sys/file.h>
|
| +#include <sys/stat.h>
|
| #include <unistd.h>
|
|
|
| #include "base/files/file_path.h"
|
| @@ -187,4 +188,13 @@ bool LoggingCloseFile(FileHandle file) {
|
| return rv == 0;
|
| }
|
|
|
| +FileOffset LoggingFileSizeByHandle(FileHandle file) {
|
| + struct stat st;
|
| + if (fstat(file, &st) != 0) {
|
| + PLOG(ERROR) << "fstat";
|
| + return -1;
|
| + }
|
| + return st.st_size;
|
| +}
|
| +
|
| } // namespace crashpad
|
|
|