mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +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/3538>
This commit is contained in:
parent
22c326edea
commit
a2c7398a1c
1 changed files with 2 additions and 1 deletions
|
@ -279,7 +279,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