test-nss: fix loading of modules under meson
There is no .libs dirs under meson. Just try both paths.
This commit is contained in:
parent
aac2605820
commit
3762b6722e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue