Mac build break fixes

Former-commit-id: 083b54472c65239b03c8a17f6b1ae6447d273e9a
This commit is contained in:
John Sully 2021-05-28 22:40:03 -04:00
parent ef5bf1fdd7
commit 1b29ba5873
3 changed files with 10 additions and 2 deletions

View File

@ -256,7 +256,10 @@ void setproctitle(const char *fmt, ...);
#define redis_set_thread_title(name) rename_thread(find_thread(0), name)
#else
#if (defined __APPLE__ && defined(MAC_OS_X_VERSION_10_7))
extern "C" int pthread_setname_np(const char *name);
#ifdef __cplusplus
extern "C"
#endif
int pthread_setname_np(const char *name);
#include <pthread.h>
#define redis_set_thread_title(name) pthread_setname_np(name)
#else

View File

@ -304,6 +304,10 @@ uint64_t fastlock_getlongwaitcount()
extern "C" void fastlock_sleep(fastlock *lock, pid_t pid, unsigned wake, unsigned myticket)
{
UNUSED(lock);
UNUSED(pid);
UNUSED(wake);
UNUSED(myticket);
#ifdef __linux__
g_dlock.registerwait(lock, pid);
unsigned mask = (1U << (myticket % 32));

View File

@ -93,4 +93,5 @@ struct fastlock
#ifdef __cplusplus
static_assert(offsetof(struct fastlock, m_ticket) == 64, "ensure padding is correct");
#endif
#endif