mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1198458 Unbreak build on BSDs by fixing non-POSIX thread includes/usage. r=jesup
on a CLOSED TREE
This commit is contained in:
parent
5aa6eb62b0
commit
16d38a8bc6
2
CLOBBER
2
CLOBBER
@ -22,4 +22,4 @@
|
||||
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
|
||||
# don't change CLOBBER for WebIDL changes any more.
|
||||
|
||||
Bug 1210211 Fix build failures on OpenBSD caused by new XPIDL interface.
|
||||
Bug 1198458 Fix failures in TaskCluster builds due to analog_agc.cc moving
|
||||
|
@ -18,6 +18,14 @@
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
|
||||
#if defined(__NetBSD__)
|
||||
#include <lwp.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <sys/param.h>
|
||||
#include <sys/thr.h>
|
||||
#include <pthread_np.h>
|
||||
#endif
|
||||
|
||||
namespace rtc {
|
||||
|
||||
PlatformThreadId CurrentThreadId() {
|
||||
|
@ -22,13 +22,6 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if defined(__NetBSD__)
|
||||
#include <lwp.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <sys/param.h>
|
||||
#include <sys/thr.h>
|
||||
#endif
|
||||
|
||||
#if defined(WEBRTC_BSD) && !defined(__NetBSD__)
|
||||
#include <pthread_np.h>
|
||||
#endif
|
||||
@ -166,9 +159,9 @@ void ThreadPosix::Run() {
|
||||
#if (defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID) || defined(WEBRTC_GONK))
|
||||
prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name_.c_str()));
|
||||
#elif defined(__NetBSD__)
|
||||
pthread_setname_np(pthread_self(), "%s", (void *)name_);
|
||||
pthread_setname_np(pthread_self(), "%s", (void *)name_.c_str());
|
||||
#elif defined(WEBRTC_BSD)
|
||||
pthread_set_name_np(pthread_self(), name_);
|
||||
pthread_set_name_np(pthread_self(), name_.c_str());
|
||||
#elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
|
||||
pthread_setname_np(name_.substr(0, 63).c_str());
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user