]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Fix passing thread dependency on platforms that need it
authorFred Morcos <fred.morcos@open-xchange.com>
Mon, 25 Mar 2024 10:30:15 +0000 (11:30 +0100)
committerFred Morcos <fred.morcos@open-xchange.com>
Mon, 25 Mar 2024 10:30:15 +0000 (11:30 +0100)
e.g. FreeBSD needs -lpthread

meson/pthread-setname/meson.build

index 8d3827fe21c6bec2d78d4c3fb2c613f9345e72a2..2f161d7b0c1d0cdf868703691d84ffda7fbdc18f 100644 (file)
@@ -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')