/*
- * Copyright (C) 2018 "IoT.bzh"
+ * Copyright (C) 2018, 2019 "IoT.bzh"
* Author José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* limitations under the License.
*/
+#if WITH_DYNAMIC_BINDING
+
#define _GNU_SOURCE
#include <stdlib.h>
struct afb_api_v3 *api;
struct afb_export *export;
- /* retrieves the register function */
- a.root = dlsym(handle, afb_api_so_v3_root);
+ /* retrieves important exported symbols */
a.desc = dlsym(handle, afb_api_so_v3_desc);
a.entry = dlsym(handle, afb_api_so_v3_entry);
- if (!a.root && !a.desc && !a.entry)
+ if (!a.desc && !a.entry)
return 0;
INFO("binding [%s] looks like an AFB binding V3", path);
/* basic checks */
+ a.root = dlsym(handle, afb_api_so_v3_root);
if (!a.root) {
ERROR("binding [%s] incomplete symbol set: %s is missing",
path, afb_api_so_v3_root);
return -1;
}
+#endif