--- base/threading/platform_thread_linux.cc.orig 2021-04-14 18:40:48 UTC +++ base/threading/platform_thread_linux.cc @@ -27,7 +27,9 @@ #if !defined(OS_NACL) && !defined(OS_AIX) #include +#if !defined(OS_BSD) #include +#endif #include #include #include @@ -298,7 +300,7 @@ const ThreadPriorityToNiceValuePair kThreadPriorityToN Optional CanIncreaseCurrentThreadPriorityForPlatform( ThreadPriority priority) { -#if !defined(OS_NACL) +#if !defined(OS_NACL) && !defined(OS_BSD) // A non-zero soft-limit on RLIMIT_RTPRIO is required to be allowed to invoke // pthread_setschedparam in SetCurrentThreadPriorityForPlatform(). struct rlimit rlim; @@ -348,7 +350,7 @@ Optional GetCurrentThreadPriorityForPl void PlatformThread::SetName(const std::string& name) { ThreadIdNameManager::GetInstance()->SetName(name); -#if !defined(OS_NACL) && !defined(OS_AIX) +#if !defined(OS_NACL) && !defined(OS_AIX) && !defined(OS_BSD) // On linux we can get the thread names to show up in the debugger by setting // the process name for the LWP. We don't want to do this for the main // thread because that would rename the process, causing tools like killall