mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
Use real pthread_setname_np implementation on old FreeBSD.
pthread_setname_np differs from pthread_set_name_np in the return value, so it is not correct to just #define one to another.
This commit is contained in:
parent
797e9b3e0b
commit
43e4625bbe
1 changed files with 8 additions and 2 deletions
|
|
@ -37,8 +37,14 @@
|
|||
#define pw_thread_loop_events_destroy(o) pw_thread_loop_events_emit(o, destroy, 0)
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <pthread_np.h>
|
||||
#define pthread_setname_np pthread_set_name_np
|
||||
#include <sys/param.h>
|
||||
#if __FreeBSD_version < 1202000
|
||||
int pthread_setname_np(pthread_t thread, const char *name)
|
||||
{
|
||||
pthread_set_name_np(thread, name);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** \cond */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue