mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 00:51:37 +00:00
avutil/thread: fix pthread_setname_np parameters for NetBSD and Apple
Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
0f118401f6
commit
2fd7817e80
@ -220,7 +220,13 @@ static inline int ff_thread_setname(const char *name)
|
||||
#if HAVE_PRCTL
|
||||
ret = AVERROR(prctl(PR_SET_NAME, name));
|
||||
#elif HAVE_PTHREAD_SETNAME_NP
|
||||
#if defined(__APPLE__)
|
||||
ret = AVERROR(pthread_setname_np(name));
|
||||
#elif defined(__NetBSD__)
|
||||
ret = AVERROR(pthread_setname_np(pthread_self(), "%s", name));
|
||||
#else
|
||||
ret = AVERROR(pthread_setname_np(pthread_self(), name));
|
||||
#endif
|
||||
#elif HAVE_PTHREAD_SET_NAME_NP
|
||||
pthread_set_name_np(pthread_self(), name);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user