xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 9 16:44:00 UTC 2021
include/meson.build | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 9f8421af637942e5d9963828f4ce55f456410603
Author: Jan Beich <jbeich at FreeBSD.org>
Date: Fri Apr 9 15:22:22 2021 +0000
meson: check pthread_setname_np like autotools
FreeBSD < 12.2 and OpenBSD only have pthread_set_name_np.
As libpthread isn't in scope use -Werror to trip the check.
Header <pthread.h> has symbol "PTHREAD_MUTEX_RECURSIVE" : YES
Checking if "pthread_setname_np(tid, name)" compiles: YES
os/inputthread.c:326:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
pthread_setname_np (pthread_self(), "InputThread");
^
os/inputthread.c:447:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
pthread_setname_np (pthread_self(), "MainThread");
^
Fixes: c20e7b5e2222 ("meson: Automatically detect HAVE_PTHREAD_SETNAME_NP")
diff --git a/include/meson.build b/include/meson.build
index b92796f31..d9ab76941 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -67,6 +67,7 @@ if cc.compiles('''
#include <pthread.h>
void foo(int bar) { pthread_setname_np(pthread_self(), "example"); }
''',
+ args: '-Werror-implicit-function-declaration',
name: 'pthread_setname_np(tid, name)')
conf_data.set('HAVE_PTHREAD_SETNAME_NP_WITH_TID', 1)
elif cc.compiles('''
@@ -74,6 +75,7 @@ elif cc.compiles('''
#include <pthread.h>
void foo(int bar) { pthread_setname_np("example"); }
''',
+ args: '-Werror-implicit-function-declaration',
name: 'pthread_setname_np(name)')
conf_data.set('HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID', 1)
endif
More information about the xorg-commit
mailing list