Skip to content

Commit

Permalink
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 <[email protected]>
  • Loading branch information
vjardin committed Mar 23, 2024
1 parent ce74fcc commit 6db0ecb
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 6db0ecb

Please sign in to comment.