summaryrefslogtreecommitdiff
path: root/lib/module.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-04-21 20:13:31 -0400
committerGitHub <noreply@github.com>2017-04-21 20:13:31 -0400
commite9e27161c3baf8a3f2a88ccfb6c8ef5e57a5d0cf (patch)
tree313b3d0852e4290baf80d1a164d7849dc17536b5 /lib/module.c
parent97b02007935d00ad8f9126045922ccc8173296ee (diff)
parentd851b2fc0d872e461b3c90056f0a1b551c0e4cf6 (diff)
Merge pull request #388 from opensourcerouting/snap-fixes-3.0
Snap fixes 3.0
Diffstat (limited to 'lib/module.c')
-rw-r--r--lib/module.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/module.c b/lib/module.c
index 4ebe3c0da2..c7dd5538cd 100644
--- a/lib/module.c
+++ b/lib/module.c
@@ -69,7 +69,7 @@ void frrmod_init(struct frrmod_runtime *modinfo)
}
struct frrmod_runtime *frrmod_load(const char *spec,
- char *err, size_t err_len)
+ const char *dir, char *err, size_t err_len)
{
void *handle = NULL;
char name[PATH_MAX], fullpath[PATH_MAX], *args;
@@ -84,12 +84,12 @@ struct frrmod_runtime *frrmod_load(const char *spec,
if (!strchr(name, '/')) {
if (!handle && execname) {
snprintf(fullpath, sizeof(fullpath), "%s/%s_%s.so",
- MODULE_PATH, execname, name);
+ dir, execname, name);
handle = dlopen(fullpath, RTLD_NOW | RTLD_GLOBAL);
}
if (!handle) {
snprintf(fullpath, sizeof(fullpath), "%s/%s.so",
- MODULE_PATH, name);
+ dir, name);
handle = dlopen(fullpath, RTLD_NOW | RTLD_GLOBAL);
}
}