1a71c6
From a91266ef087532e2332c75c4fd9244df66f30b64 Mon Sep 17 00:00:00 2001
1a71c6
From: Daiki Ueno <ueno@gnu.org>
1a71c6
Date: Fri, 18 Dec 2020 13:37:10 +0100
1a71c6
Subject: [PATCH] meson: Link trust/client modules explicitly to -ldl
1a71c6
1a71c6
This adds the -ldl link flag missing in the meson build, but present
1a71c6
in the autotools build.  Although the use-case is unlikely, this
1a71c6
allows those modules to be linked as a normal shared library to a
1a71c6
program.
1a71c6
---
1a71c6
 p11-kit/meson.build | 1 +
1a71c6
 trust/meson.build   | 2 +-
1a71c6
 2 files changed, 2 insertions(+), 1 deletion(-)
1a71c6
1a71c6
diff --git a/p11-kit/meson.build b/p11-kit/meson.build
1a71c6
index 7d57cd7..02147a9 100644
1a71c6
--- a/p11-kit/meson.build
1a71c6
+++ b/p11-kit/meson.build
1a71c6
@@ -92,6 +92,7 @@ if host_system != 'windows'
1a71c6
                 'client.c', 'client-init.c',
1a71c6
                 name_prefix: '',
1a71c6
                 include_directories: [configinc, commoninc],
1a71c6
+                dependencies: dlopen_deps,
1a71c6
                 link_args: p11_module_ldflags,
1a71c6
                 link_depends: [p11_module_symbol_map,
1a71c6
                                p11_module_symbol_def],
1a71c6
diff --git a/trust/meson.build b/trust/meson.build
1a71c6
index 482a3c1..d4a8e15 100644
1a71c6
--- a/trust/meson.build
1a71c6
+++ b/trust/meson.build
1a71c6
@@ -56,7 +56,7 @@ shared_module('p11-kit-trust',
1a71c6
               'module-init.c',
1a71c6
               name_prefix: '',
1a71c6
               c_args: p11_kit_trust_c_args,
1a71c6
-              dependencies: [asn_h_dep, libp11_library_dep] + libtasn1_deps,
1a71c6
+              dependencies: [asn_h_dep, libp11_library_dep] + dlopen_deps + libtasn1_deps,
1a71c6
               link_args: p11_module_ldflags,
1a71c6
               link_depends: [p11_module_symbol_map,
1a71c6
                              p11_module_symbol_def],
1a71c6
-- 
1a71c6
2.29.2
1a71c6