diff --git a/src/config.h b/src/config.h index addb9c3f4..0475ee7d5 100644 --- a/src/config.h +++ b/src/config.h @@ -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 #define redis_set_thread_title(name) pthread_setname_np(name) #else diff --git a/src/fastlock.cpp b/src/fastlock.cpp index 789c07caa..c61f95aac 100644 --- a/src/fastlock.cpp +++ b/src/fastlock.cpp @@ -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)); diff --git a/src/fastlock.h b/src/fastlock.h index ede6d4e16..72da9583b 100644 --- a/src/fastlock.h +++ b/src/fastlock.h @@ -93,4 +93,5 @@ struct fastlock #ifdef __cplusplus static_assert(offsetof(struct fastlock, m_ticket) == 64, "ensure padding is correct"); -#endif \ No newline at end of file +#endif +