summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-14 19:49:15 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-23 21:47:28 -0400
commit3762b6722e24c17dccf1ec7d352b403469398ba4 (patch)
tree62841873a10c706be108868cc27c4c5f9d882ffc /src/test
parentaac2605820859fe2908ba9adfcb96a65b2e375e5 (diff)
test-nss: fix loading of modules under meson
There is no .libs dirs under meson. Just try both paths.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-nss.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/test-nss.c b/src/test/test-nss.c
index b59cb7aa69..b4cb3f0d37 100644
--- a/src/test/test-nss.c
+++ b/src/test/test-nss.c
@@ -71,9 +71,11 @@ static void* open_handle(const char* dir, const char* module, int flags) {
const char *path;
void *handle;
- if (dir)
- path = strjoina(dir, "/.libs/libnss_", module, ".so.2");
- else
+ if (dir) {
+ path = strjoina(dir, "/libnss_", module, ".so.2");
+ if (access(path, F_OK) < 0)
+ path = strjoina(dir, "/.libs/libnss_", module, ".so.2");
+ } else
path = strjoina("libnss_", module, ".so.2");
handle = dlopen(path, flags);