From: Zbigniew Jędrzejewski-Szmek Date: Fri, 14 Apr 2017 23:49:15 +0000 (-0400) Subject: test-nss: fix loading of modules under meson X-Git-Tag: v234~286^2~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3762b6722e24c17dccf1ec7d352b403469398ba4;p=thirdparty%2Fsystemd.git test-nss: fix loading of modules under meson There is no .libs dirs under meson. Just try both paths. --- diff --git a/src/test/test-nss.c b/src/test/test-nss.c index b59cb7aa694..b4cb3f0d376 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);