summaryrefslogtreecommitdiff
path: root/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_debug_stack__trace__posix.cc
blob: 10b74b577ee34d0eef70db3a5cc5ae7f04a6030c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- base/allocator/partition_allocator/partition_alloc_base/debug/stack_trace_posix.cc.orig	2023-11-04 07:08:51 UTC
+++ base/allocator/partition_allocator/partition_alloc_base/debug/stack_trace_posix.cc
@@ -12,11 +12,11 @@
 #include <string.h>
 #include <unistd.h>
 
-#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE)
+#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
 #include <link.h>  // For ElfW() macro.
 #endif
 
-#if BUILDFLAG(IS_APPLE)
+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
 #define HAVE_DLADDR
 #include <dlfcn.h>
 #endif
@@ -25,7 +25,7 @@ namespace partition_alloc::internal::base::debug {
 
 namespace {
 
-#if !BUILDFLAG(IS_APPLE)
+#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
 
 constexpr size_t kBufferSize = 4096u;
 
@@ -359,7 +359,7 @@ void PrintStackTraceInternal(const void** trace, size_
 }
 #endif  // !BUILDFLAG(IS_APPLE)
 
-#if BUILDFLAG(IS_APPLE)
+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
 // Since /proc/self/maps is not available, use dladdr() to obtain module
 // names and offsets inside the modules from the given addresses.
 void PrintStackTraceInternal(const void* const* trace, size_t size) {