#include "common/crash_reporter/crash_reporter_linux.h"
-// #include <fcntl.h>
-// #include <poll.h>
-// #include <signal.h>
-// #include <stdlib.h>
-// #include <sys/socket.h>
#include <sys/time.h>
-// #include <sys/types.h>
-// #include <sys/uio.h>
-// #include <sys/wait.h>
-// #include <time.h>
#include <unistd.h>
#include "base/debug/crash_logging.h"
#include "base/linux_util.h"
#include "base/logging.h"
#include "base/path_service.h"
-// #include "base/platform_file.h"
-// #include "base/posix/global_descriptors.h"
#include "base/process/memory.h"
#include "base/memory/singleton.h"
-// #include "base/strings/string_util.h"
#include "common/crash_reporter/linux/crash_dump_handler.h"
-// #include "content/public/common/content_descriptors.h"
#include "vendor/breakpad/src/client/linux/handler/exception_handler.h"
#include "vendor/breakpad/src/common/linux/linux_libc_support.h"
#include "third_party/lss/linux_syscall_support.h"
-#define STAT_STRUCT struct kernel_stat
-#define FSTAT_FUNC sys_fstat
-
// Some versions of gcc are prone to warn about unused return values. In cases
// where we either a) know the call cannot fail, or b) there is nothing we
// can do when a call fails, we mark the return code as ignored. This avoids
void LoadDataFromFD(google_breakpad::PageAllocator& allocator,
int fd, bool close_fd, uint8_t** file_data, size_t* size) {
- STAT_STRUCT st;
- if (FSTAT_FUNC(fd, &st) != 0) {
+ struct kernel_stat st;
+ if (sys_fstat(fd, &st) != 0) {
static const char msg[] = "Cannot upload crash dump: stat failed\n";
WriteLog(msg, sizeof(msg) - 1);
if (close_fd)