mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 09:00:54 +00:00
meson: fix check for pthread_setname_np()
Need to define _GNU_SOURCE. Fixes #1542 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3539>
This commit is contained in:
parent
fbffce6d0d
commit
7f093a779a
1 changed files with 2 additions and 1 deletions
|
@ -258,7 +258,8 @@ if cc.has_function('localtime_r', prefix : '#include<time.h>')
|
|||
cdata.set('HAVE_DECL_LOCALTIME_R', 1)
|
||||
endif
|
||||
|
||||
if cc.links('''#include <pthread.h>
|
||||
if cc.links('''#define _GNU_SOURCE
|
||||
#include <pthread.h>
|
||||
int main() {
|
||||
pthread_setname_np("example"); return 0;
|
||||
}''', name : 'pthread_setname_np(const char*)')
|
||||
|
|
Loading…
Reference in a new issue