$OpenBSD: patch-base_threading_platform_thread_posix_cc,v 1.15 2021/10/29 14:49:39 robert Exp $

XXX pledge(2)

Index: base/threading/platform_thread_posix.cc
--- base/threading/platform_thread_posix.cc.orig
+++ base/threading/platform_thread_posix.cc
@@ -71,7 +71,7 @@ void* ThreadFunc(void* params) {
     if (!thread_params->joinable)
       base::ThreadRestrictions::SetSingletonAllowed(false);
 
-#if !defined(OS_NACL)
+#if !defined(OS_NACL) && !defined(OS_BSD)
 #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
     internal::PCScan::NotifyThreadCreated(internal::GetStackPointer());
 #endif
@@ -327,6 +327,9 @@ bool PlatformThread::CanIncreaseThreadPriority(ThreadP
 // static
 void PlatformThread::SetCurrentThreadPriorityImpl(ThreadPriority priority) {
 #if defined(OS_NACL)
+  NOTIMPLEMENTED();
+// avoid pledge(2) violation
+#elif defined(OS_BSD)
   NOTIMPLEMENTED();
 #else
   if (internal::SetCurrentThreadPriorityForPlatform(priority))
