diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-02-28 08:18:55 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-02-28 08:18:55 -0500 |
| commit | 7c1e76aa8d753716cf0afd9204bdeb55ad985283 (patch) | |
| tree | ff4ecd9b9815986530c3eb4060ebd179987a5ef5 /staticd/static_zebra.c | |
| parent | 1917b9e4806c540bf250fec19f0d82b1dbc6de5f (diff) | |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index b75e1a1cdf..ca0c8c4a1c 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) |
