aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/minidump_writer/minidump_writer_unittest.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-01-12 00:14:27 +0000
committerthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-01-12 00:14:27 +0000
commit972ae49d47cc83eb77764655689de2199ae1135c (patch)
treeb876c7b48bc5191e8097c4cfcb90de57602049c6 /src/client/linux/minidump_writer/minidump_writer_unittest.cc
parentFix review comment that I missed. (diff)
downloadbreakpad-972ae49d47cc83eb77764655689de2199ae1135c.tar.xz
Fix compile by adding needed includes.
Review URL: http://breakpad.appspot.com/253001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@753 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/minidump_writer/minidump_writer_unittest.cc')
-rw-r--r--src/client/linux/minidump_writer/minidump_writer_unittest.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/client/linux/minidump_writer/minidump_writer_unittest.cc b/src/client/linux/minidump_writer/minidump_writer_unittest.cc
index 5377aaca..5f6bb34a 100644
--- a/src/client/linux/minidump_writer/minidump_writer_unittest.cc
+++ b/src/client/linux/minidump_writer/minidump_writer_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 Google Inc.
+// Copyright (c) 2011 Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -27,10 +27,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <unistd.h>
+#include <fcntl.h>
#include <sys/poll.h>
#include <sys/stat.h>
#include <sys/syscall.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <string>
#include "breakpad_googletest_includes.h"
#include "client/linux/handler/exception_handler.h"
@@ -113,7 +117,7 @@ TEST(MinidumpWriterTest, MappingInfo) {
// And append a zero, because module IDs include an "age" field
// which is always zero on Linux.
module_identifier += "0";
-
+
// Get some memory.
char* memory =
reinterpret_cast<char*>(mmap(NULL,
@@ -148,7 +152,7 @@ TEST(MinidumpWriterTest, MappingInfo) {
info.size = kMemorySize;
info.offset = 0;
strcpy(info.name, kMemoryName);
-
+
MappingList mappings;
MappingEntry mapping;
mapping.first = info;
@@ -205,7 +209,7 @@ TEST(MinidumpWriterTest, MappingInfoContained) {
// And append a zero, because module IDs include an "age" field
// which is always zero on Linux.
module_identifier += "0";
-
+
// mmap a file
char tempfile[] = TEMPDIR "/minidump-writer-unittest-temp-XXXXXX";
mktemp(tempfile);
@@ -259,7 +263,8 @@ TEST(MinidumpWriterTest, MappingInfoContained) {
mapping.first = info;
memcpy(mapping.second, kModuleGUID, sizeof(MDGUID));
mappings.push_back(mapping);
- ASSERT_TRUE(WriteMinidump(dumpfile, child, &context, sizeof(context), mappings));
+ ASSERT_TRUE(
+ WriteMinidump(dumpfile, child, &context, sizeof(context), mappings));
// Read the minidump. Load the module list, and ensure that
// the mmap'ed |memory| is listed with the given module name