mirror of
https://github.com/chromium/crashpad.git
synced 2025-01-14 09:17:57 +08:00
Fix crashpad_util_test build with GCC after 4b450c813795
Change-Id: I968005ccb518f80c572d11d3443646cdb5de813e Reviewed-on: https://chromium-review.googlesource.com/471946 Commit-Queue: Mark Mentovai <mark@chromium.org> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
parent
9c6d190b95
commit
fd9f952393
@ -38,8 +38,10 @@ void CreateFile(const base::FilePath& path) {
|
||||
#if defined(OS_POSIX)
|
||||
int fd = HANDLE_EINTR(creat(path.value().c_str(), 0644));
|
||||
ASSERT_GE(fd, 0) << ErrnoMessage("creat") << " " << path.value();
|
||||
ASSERT_EQ(IGNORE_EINTR(close(fd)), 0) << ErrnoMessage("close") << " "
|
||||
<< path.value();
|
||||
|
||||
// gcc refuses to compile ASSERT_EQ(IGNORE_EINTR(close(fd)), 0).
|
||||
int close_rv = IGNORE_EINTR(close(fd));
|
||||
ASSERT_EQ(close_rv, 0) << ErrnoMessage("close") << " " << path.value();
|
||||
#elif defined(OS_WIN)
|
||||
int fd = _wcreat(path.value().c_str(), _S_IREAD | _S_IWRITE);
|
||||
ASSERT_GE(fd, 0) << ErrnoMessage("_wcreat") << " " << path.value();
|
||||
|
Loading…
x
Reference in New Issue
Block a user