Skip to content

Commit

Permalink
lib: libyang2 workarounds, argue about keeping it
Browse files Browse the repository at this point in the history
The purpose of this specific commit is to record the specific
commits related to some workarounds. It is safe to drop
this code once libyang3 will be the official one. Currently,
let's keep both code: the legacy and the new one in order to keep
compiling FRR with Linux distros that are using some old libyang
versions.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
  • Loading branch information
vjardin committed Mar 23, 2024
1 parent 8a1e2b0 commit c68a588
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/yang.c
Original file line number Diff line number Diff line change
Expand Up @@ -1336,11 +1336,16 @@ LY_ERR yang_lyd_trim_xpath(struct lyd_node **root, const char *xpath)

/*
* Safe to remove after libyang v2.1.128 is required
* XXX it is not removed for libyang3 migration in order
* to have a double support of libyang2 and libyang3 support
* during an interim period.
*/
const char *yang_ly_strerrcode(LY_ERR err)
{
#ifdef HAVE_LY_STRERRCODE
return ly_strerrcode(err);
#elif defined(HAVE_LY_STRERR)
return ly_strerr(err);
#else
switch (err) {
case LY_SUCCESS:
Expand Down

0 comments on commit c68a588

Please sign in to comment.