mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
Fix NetBSD build by fixing redis_set_thread_title() support.
See #7188.
This commit is contained in:
parent
68b5eed41d
commit
6fe2b5236d
@ -230,9 +230,12 @@ void setproctitle(const char *fmt, ...);
|
|||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#define redis_set_thread_title(name) pthread_setname_np(pthread_self(), name)
|
#define redis_set_thread_title(name) pthread_setname_np(pthread_self(), name)
|
||||||
#else
|
#else
|
||||||
#if (defined __NetBSD__ || defined __FreeBSD__ || defined __OpenBSD__)
|
#if (defined __FreeBSD__ || defined __OpenBSD__)
|
||||||
#include <pthread_np.h>
|
#include <pthread_np.h>
|
||||||
#define redis_set_thread_title(name) pthread_set_name_np(pthread_self(), name)
|
#define redis_set_thread_title(name) pthread_set_name_np(pthread_self(), name)
|
||||||
|
#elif defined __NetBSD__
|
||||||
|
#include <pthread.h>
|
||||||
|
#define redis_set_thread_title(name) pthread_setname_np(pthread_self(), name, NULL)
|
||||||
#else
|
#else
|
||||||
#if (defined __APPLE__ && defined(MAC_OS_X_VERSION_10_7))
|
#if (defined __APPLE__ && defined(MAC_OS_X_VERSION_10_7))
|
||||||
int pthread_setname_np(const char *name);
|
int pthread_setname_np(const char *name);
|
||||||
|
Loading…
Reference in New Issue
Block a user