mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
Avoid use of a Linux-only header in cross-platform code
Change-Id: I358ee1d7e09868e64df1f1dc6c0f49e40099ff16 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2259336 Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
d9c3e7cb36
commit
f4b906c79c
@ -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 {
|
||||
|
@ -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",
|
||||
]
|
||||
|
||||
|
32
util/win/traits.h
Normal file
32
util/win/traits.h
Normal file
@ -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 <stdint.h>
|
||||
|
||||
namespace crashpad {
|
||||
|
||||
struct Traits32 {
|
||||
using Address = DWORD;
|
||||
};
|
||||
|
||||
struct Traits64 {
|
||||
using Address = DWORD64;
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
||||
#endif // CRASHPAD_UTIL_WIN_TRAITS_H_
|
Loading…
x
Reference in New Issue
Block a user