From: Fred Morcos Date: Mon, 25 Mar 2024 10:30:15 +0000 (+0100) Subject: Meson: Fix passing thread dependency on platforms that need it X-Git-Tag: rec-5.1.0-alpha1~80^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5459b974b9ebfdf5ade82186fe1616a8abef6107;p=thirdparty%2Fpdns.git Meson: Fix passing thread dependency on platforms that need it e.g. FreeBSD needs -lpthread --- 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')