From d27e51c338cfb6b3ec483bdc5fbe33c5db3a00ee Mon Sep 17 00:00:00 2001 From: Clément Bénier Date: Tue, 28 Aug 2018 14:29:55 +0200 Subject: shared library: pass afb-helpers to shared library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add afb-timer in helpers: rename ctl-timer from ctl-utilities into afb-timer Change-Id: Ic88105d140edabcc96b091fb23f215db11ccb8c6 Signed-off-by: Clément Bénier --- filescan-utils.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'filescan-utils.h') diff --git a/filescan-utils.h b/filescan-utils.h index 64ecfb9..a74dcb3 100644 --- a/filescan-utils.h +++ b/filescan-utils.h @@ -86,10 +86,21 @@ extern json_object* ScanForConfig (const char* searchPath, CtlScanDirModeT mode, * * @return char* string representing the path to binding root directory. */ -#if(AFB_BINDING_VERSION == 0 && defined(AFB_BINDING_WANT_DYNAPI)) -extern char *GetBindingDirPath(struct afb_dynapi *dynapi); +extern char *GetBindingDirPath_(int fd); +#if(AFB_BINDING_VERSION == 2) +static inline char *GetBindingDirPath_v2() +{ + return GetBindingDirPath_(afb_daemon_rootdir_get_fd_v2()); +} +__attribute__((alias("GetBindingDirPath_v2"))) +static char *GetBindingDirPath(); #else -extern char *GetBindingDirPath(); +static char *GetBindingDirPath_v3(struct afb_api_x3* apiHandle) +{ + return GetBindingDirPath_(afb_api_x3_rootdir_get_fd(apiHandle)); +} +__attribute__((alias("GetBindingDirPath_v3"))) +static char *GetBindingDirPath(struct afb_api_x3* apiHandle); #endif /** -- cgit