aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/acl/acl.h
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2018-04-20 10:55:24 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2018-04-20 10:55:24 +0200
commitfd2e3765219ad6c47d24e82e9bbf2d54d5b6b207 (patch)
tree5187c7a33f1ce94751160e61c56c70f93162bc82 /src/plugins/acl/acl.h
parent774bfc36bb2971687cc775d181ebaf0916803baf (diff)
acl-plugin: acl-as-a-service: VPP-1248: fix the error if exports.h included in more than one C file
Including the exports.h from multiple .c files belonging to a single plugin results in an error. Fix that by making all the exported function pointers static, so every place which includes the exports.h gets its own copy of function pointers. This will also require to call separately the acl_plugin_exports_init() per file to initialize them. Change-Id: Icb70695efa23579c46c716944838766cebc8573e Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/plugins/acl/acl.h')
-rw-r--r--src/plugins/acl/acl.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/acl/acl.h b/src/plugins/acl/acl.h
index 8e7c80076f6..8f3112dd258 100644
--- a/src/plugins/acl/acl.h
+++ b/src/plugins/acl/acl.h
@@ -366,9 +366,12 @@ extern acl_main_t acl_main;
* pointer to the above.
* Needed for some gymnastics to be able to provide
* the inline functions from this plugin to other plugins.
+ * If the ACL_PLUGIN_EXTERNAL_EXPORTS is defined, then
+ * there is a static definition in public_exports.h - do not collide with that.
*/
-
+#ifndef ACL_PLUGIN_EXTERNAL_EXPORTS
extern acl_main_t *p_acl_main;
+#endif
void *acl_plugin_set_heap();