From 3c573b54ae138c81c0224f22b38f5d439b56f9a1 Mon Sep 17 00:00:00 2001 From: Justin Cohen Date: Mon, 2 Mar 2020 20:34:47 -0500 Subject: [PATCH] [ios] Fix iOS device build. Change-Id: Ib0f5af9680b4b626df2da006789eb846cd38579d Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2081269 Reviewed-by: Mark Mentovai Commit-Queue: Justin Cohen --- snapshot/BUILD.gn | 2 +- util/misc/capture_context.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/snapshot/BUILD.gn b/snapshot/BUILD.gn index d3f51128..d3f69939 100644 --- a/snapshot/BUILD.gn +++ b/snapshot/BUILD.gn @@ -328,7 +328,7 @@ source_set("snapshot_test") { "sanitized/process_snapshot_sanitized_test.cc", "sanitized/sanitization_information_test.cc", ] - } else { + } else if (!crashpad_is_ios) { sources += [ "crashpad_info_client_options_test.cc" ] } diff --git a/util/misc/capture_context.h b/util/misc/capture_context.h index 541589df..a88a1033 100644 --- a/util/misc/capture_context.h +++ b/util/misc/capture_context.h @@ -17,7 +17,9 @@ #include "build/build_config.h" -#if defined(OS_MACOSX) +#if defined(OS_IOS) +#include +#elif defined(OS_MACOSX) #include #elif defined(OS_WIN) #include @@ -29,7 +31,9 @@ namespace crashpad { -#if defined(OS_MACOSX) +#if defined(OS_IOS) +using NativeCPUContext = ucontext_t; +#elif defined(OS_MACOSX) #if defined(ARCH_CPU_X86_FAMILY) using NativeCPUContext = x86_thread_state; #endif