From a216790c28faabeb2dff222486e1668db707f6c0 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sun, 15 Apr 2012 14:13:07 +0200 Subject: [PATCH] do plugins on apple --- src/vio/csync_vio.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/vio/csync_vio.c b/src/vio/csync_vio.c index b50e6ce884..8b51270ae9 100644 --- a/src/vio/csync_vio.c +++ b/src/vio/csync_vio.c @@ -70,6 +70,15 @@ int csync_vio_init(CSYNC *ctx, const char *module, const char *args) { } #endif +#ifdef __APPLE__ + if (lstat(path, &sb) < 0) { + SAFE_FREE(path); + if (asprintf(&path, "../Plugins/csync_%s.%s", module, MODULE_EXTENSION) < 0) { + return -1; + } + } +#endif + ctx->module.handle = dlopen(path, RTLD_LAZY); SAFE_FREE(path); if ((err = dlerror()) != NULL) {