From 5459b974b9ebfdf5ade82186fe1616a8abef6107 Mon Sep 17 00:00:00 2001 From: Fred Morcos Date: Mon, 25 Mar 2024 11:30:15 +0100 Subject: [PATCH] Meson: Fix passing thread dependency on platforms that need it e.g. FreeBSD needs -lpthread --- meson/pthread-setname/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meson/pthread-setname/meson.build b/meson/pthread-setname/meson.build index 8d3827fe21..2f161d7b0c 100644 --- a/meson/pthread-setname/meson.build +++ b/meson/pthread-setname/meson.build @@ -38,7 +38,12 @@ foreach variant: variants variant_description = variant[2] variant_program = variant[3] - if cxx.links(variant_program, name: variant_name, args: have_pthread_np_h ? ['-DHAVE_PTHREAD_NP_H'] : []) + if cxx.links( + variant_program, + name: variant_name, + dependencies: dep_threads, + args: have_pthread_np_h ? ['-DHAVE_PTHREAD_NP_H'] : [] + ) found = true conf.set(variant_define, true, description: variant_description) summary('pthread_setname Variant', variant_define, section: 'POSIX Threads') -- 2.47.2