mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05: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)
|
#define pw_thread_loop_events_destroy(o) pw_thread_loop_events_emit(o, destroy, 0)
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
#include <pthread_np.h>
|
#include <sys/param.h>
|
||||||
#define pthread_setname_np pthread_set_name_np
|
#if __FreeBSD_version < 1202000
|
||||||
|
int pthread_setname_np(pthread_t thread, const char *name)
|
||||||
|
{
|
||||||
|
pthread_set_name_np(thread, name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \cond */
|
/** \cond */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue