X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-so-v3.c;h=bef27e2e01b0e5cea495f6ab5de245d1ade2c57c;hb=6f42df1ed42331d115991bbb1937df15b160bdfc;hp=727e9b6927669f823dae15b7fff41bbd516948f6;hpb=86e4c175b0c35d38c8a214ae1c6afce6ad6aac4c;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-so-v3.c b/src/afb-api-so-v3.c index 727e9b69..bef27e2e 100644 --- a/src/afb-api-so-v3.c +++ b/src/afb-api-so-v3.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 "IoT.bzh" + * Copyright (C) 2018, 2019 "IoT.bzh" * Author José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +15,8 @@ * limitations under the License. */ +#if WITH_DYNAMIC_BINDING + #define _GNU_SOURCE #include @@ -73,16 +75,16 @@ int afb_api_so_v3_add(const char *path, void *handle, struct afb_apiset *declare 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); @@ -135,3 +137,4 @@ error: return -1; } +#endif