aboutsummaryrefslogtreecommitdiff
path: root/devel/electron23/files/patch-third__party_perfetto_include_perfetto_base_thread__utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'devel/electron23/files/patch-third__party_perfetto_include_perfetto_base_thread__utils.h')
-rw-r--r--devel/electron23/files/patch-third__party_perfetto_include_perfetto_base_thread__utils.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/devel/electron23/files/patch-third__party_perfetto_include_perfetto_base_thread__utils.h b/devel/electron23/files/patch-third__party_perfetto_include_perfetto_base_thread__utils.h
new file mode 100644
index 000000000000..7e6881fb2cc6
--- /dev/null
+++ b/devel/electron23/files/patch-third__party_perfetto_include_perfetto_base_thread__utils.h
@@ -0,0 +1,22 @@
+--- third_party/perfetto/include/perfetto/base/thread_utils.h.orig 2023-02-01 18:45:20 UTC
++++ third_party/perfetto/include/perfetto/base/thread_utils.h
+@@ -34,6 +34,7 @@ __declspec(dllimport) unsigned long __stdcall GetCurre
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <pthread.h>
+ #else
+ #include <pthread.h>
+ #endif
+@@ -45,6 +46,11 @@ namespace base {
+ using PlatformThreadId = pid_t;
+ inline PlatformThreadId GetThreadId() {
+ return gettid();
++}
++#elif PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
++using PlatformThreadId = uint64_t;
++inline PlatformThreadId GetThreadId() {
++ return reinterpret_cast<uint64_t>(pthread_self());
+ }
+ #elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX)
+ using PlatformThreadId = pid_t;