aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-base_logging__unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium/files/patch-base_logging__unittest.cc')
-rw-r--r--www/chromium/files/patch-base_logging__unittest.cc25
1 files changed, 18 insertions, 7 deletions
diff --git a/www/chromium/files/patch-base_logging__unittest.cc b/www/chromium/files/patch-base_logging__unittest.cc
index dfe9a09bd0bb..fda45153671e 100644
--- a/www/chromium/files/patch-base_logging__unittest.cc
+++ b/www/chromium/files/patch-base_logging__unittest.cc
@@ -1,20 +1,31 @@
---- base/logging_unittest.cc.orig 2021-04-14 18:40:48 UTC
+--- base/logging_unittest.cc.orig 2024-01-30 07:53:34 UTC
+++ base/logging_unittest.cc
@@ -32,7 +32,7 @@
#include "base/posix/eintr_wrapper.h"
- #endif // OS_POSIX
+ #endif // BUILDFLAG(IS_POSIX)
--#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
-+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD)
#include <ucontext.h>
#endif
-@@ -557,7 +557,7 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo
+@@ -570,14 +570,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo
// need the arch-specific boilerplate below, which is inspired by breakpad.
// At the same time, on OSX, ucontext.h is deprecated but si_addr works fine.
uintptr_t crash_addr = 0;
--#if defined(OS_MAC)
-+#if defined(OS_MAC) || defined(OS_BSD)
+-#if BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FREEBSD)
crash_addr = reinterpret_cast<uintptr_t>(info->si_addr);
#else // OS_*
ucontext_t* context = reinterpret_cast<ucontext_t*>(context_ptr);
+ #if defined(ARCH_CPU_X86)
+ crash_addr = static_cast<uintptr_t>(context->uc_mcontext.gregs[REG_EIP]);
+ #elif defined(ARCH_CPU_X86_64)
++#if BUILDFLAG(IS_OPENBSD)
++ crash_addr = static_cast<uintptr_t>(context->sc_rip);
++#else
+ crash_addr = static_cast<uintptr_t>(context->uc_mcontext.gregs[REG_RIP]);
++#endif
+ #elif defined(ARCH_CPU_ARMEL)
+ crash_addr = static_cast<uintptr_t>(context->uc_mcontext.arm_pc);
+ #elif defined(ARCH_CPU_ARM64)