n64: fix macOS build (#1507)

The paraLLEl-RDP build was broken on macOS because of a change from
February to Granite in regarding platform ifdefs for pthreads.

A PR that applies a fix has been opened
[upstream](https://github.com/Themaister/Granite/pull/131), but until an
upstream fix lands, this PR will unbreak the build for ares without
needing to roll back the recent paraLLEl-RDP update entirely.

Co-authored-by: jcm <butt@butts.com>
このコミットが含まれているのは:
jcm 2024-05-28 09:02:15 -05:00 committed by GitHub
コミット dd25ac4f72
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: B5690EEEBB952194
1個のファイルの変更6行の追加4行の削除

ファイルの表示

@ -22,7 +22,7 @@
#include "thread_name.hpp"
#ifdef __linux__
#if !defined(_WIN32)
#include <pthread.h>
#else
#define WIN32_LEAN_AND_MEAN
@ -34,9 +34,11 @@ namespace Util
{
void set_current_thread_name(const char *name)
{
#ifdef __linux__
#if defined(__linux__)
pthread_setname_np(pthread_self(), name);
#else
#elif defined(__APPLE__)
pthread_setname_np(name);
#elif defined(_WIN32)
using PFN_SetThreadDescription = HRESULT (WINAPI *)(HANDLE, PCWSTR);
auto module = GetModuleHandleA("kernel32.dll");
PFN_SetThreadDescription SetThreadDescription = module ? reinterpret_cast<PFN_SetThreadDescription>(