$OpenBSD: patch-base_threading_platform_thread_posix_cc,v 1.14 2019/09/28 16:29:40 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)
     // Threads on linux/android may inherit their priority from the thread
     // where they were created. This explicitly sets the priority of all new
     // threads.
@@ -327,6 +327,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.
