summaryrefslogtreecommitdiffstats
path: root/staticd/static_zebra.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-02-28 14:18:55 +0100
committerDonald Sharp <sharpd@nvidia.com>2022-02-28 14:18:55 +0100
commit7c1e76aa8d753716cf0afd9204bdeb55ad985283 (patch)
treeff4ecd9b9815986530c3eb4060ebd179987a5ef5 /staticd/static_zebra.c
parentMerge pull request #10639 from patrasar/master_pimv6_upstream (diff)
downloadfrr-7c1e76aa8d753716cf0afd9204bdeb55ad985283.tar.xz
frr-7c1e76aa8d753716cf0afd9204bdeb55ad985283.zip
staticd: Fix `make check` failures
Recent commit: abc246e19345cbd2bc74c7dc50dac0b9cf2addf8 Has broken `make check` with recently new compilers: /usr/bin/ld: staticd/libstatic.a(static_nb_config.o): warning: relocation against `zebra_ecmp_count' in read-only section `.text' CCLD tests/bgpd/test_peer_attr CCLD tests/bgpd/test_packet /usr/bin/ld: staticd/libstatic.a(static_zebra.o): in function `static_zebra_capabilities': /home/sharpd/frr5/staticd/static_zebra.c:208: undefined reference to `zebra_ecmp_count' /usr/bin/ld: staticd/libstatic.a(static_zebra.o): in function `static_zebra_route_add': /home/sharpd/frr5/staticd/static_zebra.c:418: undefined reference to `zebra_ecmp_count' /usr/bin/ld: staticd/libstatic.a(static_nb_config.o): in function `static_nexthop_create': /home/sharpd/frr5/staticd/static_nb_config.c:174: undefined reference to `zebra_ecmp_count' /usr/bin/ld: /home/sharpd/frr5/staticd/static_nb_config.c:175: undefined reference to `zebra_ecmp_count' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE collect2: error: ld returned 1 exit status make: *** [Makefile:8679: tests/lib/test_grpc] Error 1 make: *** Waiting for unfinished jobs.... Essentially the newly introduced variable zebra_ecmp_count is not available in the libstatic.a compiled and make check has code that compiles against it. The fix is to just move the variable to the library. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'staticd/static_zebra.c')
-rw-r--r--staticd/static_zebra.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c
index b75e1a1cd..ca0c8c4a1 100644
--- a/staticd/static_zebra.c
+++ b/staticd/static_zebra.c
@@ -47,6 +47,7 @@
/* Zebra structure to hold current status. */
struct zclient *zclient;
static struct hash *static_nht_hash;
+uint32_t zebra_ecmp_count = MULTIPATH_NUM;
/* Inteface addition message from zebra. */
static int static_ifp_create(struct interface *ifp)