c48b2da0a1
general OK from MAINTAINER, after cleanup, OK from landry@ and sthen@
27 lines
965 B
Plaintext
27 lines
965 B
Plaintext
$OpenBSD: patch-src_plugin_loader_c,v 1.1 2010/06/14 12:36:34 sebastia Exp $
|
|
the plugins get installed to $LOCALBASE/lib/olsrd-plugins, so load them from there.
|
|
--- src/plugin_loader.c.orig Tue Jun 1 09:42:27 2010
|
|
+++ src/plugin_loader.c Tue Jun 1 09:43:13 2010
|
|
@@ -87,20 +87,14 @@ olsr_load_plugins(void)
|
|
static int
|
|
olsr_load_dl(char *libname, struct plugin_param *params)
|
|
{
|
|
-#if TESTLIB_PATH
|
|
- char path[256] = "/usr/testlib/";
|
|
-#endif
|
|
+ char path[256] = "${LOCALBASE}/lib/olsrd-plugins/";
|
|
struct olsr_plugin *plugin = olsr_malloc(sizeof(struct olsr_plugin), "Plugin entry");
|
|
int rv;
|
|
|
|
OLSR_PRINTF(0, "---------- LOADING LIBRARY %s ----------\n", libname);
|
|
|
|
-#if TESTLIB_PATH
|
|
strcat(path, libname);
|
|
plugin->dlhandle = dlopen(path, RTLD_NOW);
|
|
-#else
|
|
- plugin->dlhandle = dlopen(libname, RTLD_NOW);
|
|
-#endif
|
|
if (plugin->dlhandle == NULL) {
|
|
const int save_errno = errno;
|
|
OLSR_PRINTF(0, "DL loading failed: \"%s\"!\n", dlerror());
|