diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2025-08-23 09:11:19 +0300 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2025-08-23 09:12:47 +0300 |
| commit | 81ff303d2ef2b0265c3f077979925caddbb56734 (patch) | |
| tree | 27b6f816b74938c298af3fd56eda872623a9cfe7 | |
| parent | 6b89f4abae0a4606a2fbbd4bf71d82c9dd3f52c6 (diff) | |
meson.build: check for pthread_setname_np
| -rw-r--r-- | meson.build | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 3ec8a5f..6bf392e 100644 --- a/meson.build +++ b/meson.build @@ -165,6 +165,19 @@ else message('no wordexp, no command-line option expansion') endif +pthread_setname_np_code = ''' +#include <pthread.h> +int main() { return pthread_setname_np(pthread_self(), "test"); } +''' +pthread_setname_np_check = cxx.compiles( + pthread_setname_np_code, + name: 'pthread_setname_np check', + args: '-D_GNU_SOURCE' +) +if pthread_setname_np_check + config_h_data.set('HAVE_PTHREAD_SETNAME_NP', 1) +endif + if not get_option('tests').disabled() # only needed for tests cp=find_program('cp') |
