mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 936341 - Get NSPR emulation working on BSD. r=billm
This commit is contained in:
parent
72a8653132
commit
2249872963
@ -2916,7 +2916,7 @@ if test "$_USE_SYSTEM_NSPR" || (test "$NSPR_CFLAGS" -o "$NSPR_LIBS"); then
|
||||
fi
|
||||
|
||||
case "$target" in
|
||||
*linux*|*darwin*)
|
||||
*linux*|*darwin*|*dragonfly*|*freebsd*|*netbsd*|*openbsd*)
|
||||
if test -z "$_HAS_NSPR"; then JS_POSIX_NSPR_DEFAULT=1; fi
|
||||
;;
|
||||
esac
|
||||
|
@ -14,6 +14,10 @@
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
#include <pthread_np.h>
|
||||
#endif
|
||||
|
||||
class nspr::Thread
|
||||
{
|
||||
pthread_t pthread_;
|
||||
@ -146,6 +150,11 @@ PR_SetCurrentThreadName(const char *name)
|
||||
int result;
|
||||
#ifdef XP_MACOSX
|
||||
result = pthread_setname_np(name);
|
||||
#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
pthread_set_name_np(pthread_self(), name);
|
||||
result = 0;
|
||||
#elif defined(__NetBSD__)
|
||||
result = pthread_setname_np(pthread_self(), "%s", (void *)name);
|
||||
#else
|
||||
result = pthread_setname_np(pthread_self(), name);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user