$OpenBSD: patch-base_threading_platform_thread_posix_cc,v 1.16 2021/01/20 07:28:07 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
@@ -66,7 +66,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 defined(OS_APPLE)
     PlatformThread::SetCurrentThreadRealtimePeriodValue(
@@ -333,6 +333,9 @@ void PlatformThread::SetCurrentThreadPriorityImpl(Thre
 ThreadPriority PlatformThread::GetCurrentThreadPriority() {
 #if defined(OS_NACL)
   NOTIMPLEMENTED();
+  return ThreadPriority::NORMAL;
+// avoid pledge(2) violation
+#elif defined(OS_BSD)
   return ThreadPriority::NORMAL;
 #else
   // Mirrors SetCurrentThreadPriority()'s implementation.
