summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-12-19 16:44:37 +0100
committerRenato Westphal <renato@opensourcerouting.org>2019-12-19 16:44:37 +0100
commit8a328d1787845e86f71de81575fe679fa917ce9d (patch)
tree036a1839154de0cda2e8394764390b7b8aa327d8 /lib
parentMerge pull request #5552 from sworleys/NHG-Set-RTNH_F_ONLINK (diff)
downloadfrr-8a328d1787845e86f71de81575fe679fa917ce9d.tar.xz
frr-8a328d1787845e86f71de81575fe679fa917ce9d.zip
lib: fix build of the northbound plugins
Commit 1b3e9a21dd4 removed the global visibility of the yang_modules variable, breaking the build of all northbound plugins. Revert a small part of that commit to fix this issue. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/yang.c2
-rw-r--r--lib/yang.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/yang.c b/lib/yang.c
index 78ea7d0dd..d153f7553 100644
--- a/lib/yang.c
+++ b/lib/yang.c
@@ -87,7 +87,7 @@ static inline int yang_module_compare(const struct yang_module *a,
}
RB_GENERATE(yang_modules, yang_module, entry, yang_module_compare)
-static struct yang_modules yang_modules = RB_INITIALIZER(&yang_modules);
+struct yang_modules yang_modules = RB_INITIALIZER(&yang_modules);
struct yang_module *yang_module_load(const char *module_name)
{
diff --git a/lib/yang.h b/lib/yang.h
index ae3e78202..6892e3601 100644
--- a/lib/yang.h
+++ b/lib/yang.h
@@ -114,6 +114,9 @@ typedef int (*yang_iterate_cb)(const struct lys_node *snode, void *arg);
/* Global libyang context for native FRR models. */
extern struct ly_ctx *ly_native_ctx;
+/* Tree of all loaded YANG modules. */
+extern struct yang_modules yang_modules;
+
/*
* Create a new YANG module and load it using libyang. If the YANG module is not
* found in the YANG_MODELS_PATH directory, the program will exit with an error.