diff --git a/snapshot/crashpad_types/crashpad_info_reader.cc b/snapshot/crashpad_types/crashpad_info_reader.cc index 07a9b48e..e4c8b934 100644 --- a/snapshot/crashpad_types/crashpad_info_reader.cc +++ b/snapshot/crashpad_types/crashpad_info_reader.cc @@ -18,9 +18,14 @@ #include "build/build_config.h" #include "client/crashpad_info.h" -#include "util/linux/traits.h" #include "util/misc/as_underlying_type.h" +#if defined(OS_WINDOWS) +#include "util/win/traits.h" +#elif defined(OS_LINUX) || defined(OS_ANDROID) +#include "util/linux/traits.h" +#endif + namespace crashpad { namespace { diff --git a/util/BUILD.gn b/util/BUILD.gn index 60954554..388bc145 100644 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -491,11 +491,13 @@ static_library("util") { "win/scoped_local_alloc.h", "win/scoped_process_suspend.cc", "win/scoped_process_suspend.h", + "win/scoped_registry_key.h", "win/scoped_set_event.cc", "win/scoped_set_event.h", "win/session_end_watcher.cc", "win/session_end_watcher.h", "win/termination_codes.h", + "win/traits.h", "win/xp_compat.h", ] diff --git a/util/win/traits.h b/util/win/traits.h new file mode 100644 index 00000000..7ddf0f26 --- /dev/null +++ b/util/win/traits.h @@ -0,0 +1,32 @@ +// Copyright 2020 The Crashpad Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef CRASHPAD_UTIL_WIN_TRAITS_H_ +#define CRASHPAD_UTIL_WIN_TRAITS_H_ + +#include + +namespace crashpad { + +struct Traits32 { + using Address = DWORD; +}; + +struct Traits64 { + using Address = DWORD64; +}; + +} // namespace crashpad + +#endif // CRASHPAD_UTIL_WIN_TRAITS_H_