mirror of
https://github.com/systemd/systemd.git
synced 2025-08-02 04:22:27 +03:00
test-nss: fix loading of modules under meson
There is no .libs dirs under meson. Just try both paths.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user