mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 00:24:17 +07:00
Fix problem building external plugins
The file plugin.h is installed to $prefix/include and used by external plugins. Therefore it must not include, or depend on, features set by the configure script in config.h Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -320,7 +320,7 @@ int main(int argc, char* argv[])
|
||||
* Load plugins early, finit.conf may contain references to
|
||||
* features implemented by plugins.
|
||||
*/
|
||||
plugin_init(&loop, PLUGIN_PATH);
|
||||
plugin_init(&loop);
|
||||
|
||||
/*
|
||||
* Hello world.
|
||||
|
||||
+2
-2
@@ -382,11 +382,11 @@ static int load_plugins(char *path)
|
||||
}
|
||||
#endif /* ENABLE_STATIC */
|
||||
|
||||
int plugin_init(uev_ctx_t *ctx, char *path)
|
||||
int plugin_init(uev_ctx_t *ctx)
|
||||
{
|
||||
int fail = 1;
|
||||
|
||||
if (!load_plugins(path))
|
||||
if (!load_plugins(PLUGIN_PATH))
|
||||
fail = init_plugins(ctx);
|
||||
|
||||
return fail;
|
||||
|
||||
@@ -24,16 +24,11 @@
|
||||
#ifndef FINIT_PLUGIN_H_
|
||||
#define FINIT_PLUGIN_H_
|
||||
|
||||
#include <config.h>
|
||||
#include <uev/uev.h>
|
||||
#include <lite/queue.h> /* BSD sys/queue.h API */
|
||||
|
||||
#include "svc.h"
|
||||
|
||||
#ifndef PLUGIN_PATH /* Fallback for --enable-static builds */
|
||||
#define PLUGIN_PATH "/dev/null"
|
||||
#endif
|
||||
|
||||
#define PLUGIN_DEP_MAX 10
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ int plugin_exists (hook_point_t no);
|
||||
void plugin_run_hook (hook_point_t no, void *arg);
|
||||
void plugin_run_hooks (hook_point_t no);
|
||||
|
||||
int plugin_init (uev_ctx_t *ctx, char *path);
|
||||
int plugin_init (uev_ctx_t *ctx);
|
||||
void plugin_exit (void);
|
||||
|
||||
#endif /* FINIT_PRIVATE_H_ */
|
||||
|
||||
Reference in New Issue
Block a user