projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aac2605
)
test-nss: fix loading of modules under meson
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Fri, 14 Apr 2017 23:49:15 +0000
(19:49 -0400)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Mon, 24 Apr 2017 01:47:28 +0000
(21:47 -0400)
There is no .libs dirs under meson. Just try both paths.
src/test/test-nss.c
patch
|
blob
|
history
diff --git
a/src/test/test-nss.c
b/src/test/test-nss.c
index
b59cb7a
..
b4cb3f0
100644
(file)
--- 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);