pimd: Make frr able to be built by gcc 10

- Add extern modifier to some declarations in header file and move
qpim_all_pim_routers_addr definition to pimd/pimd.c

`GCC now defaults to -fno-common. As a result, global variable accesses
are more efficient on various targets. In C, global variables with
multiple tentative definitions now result in linker errors.`
Taken from https://gcc.gnu.org/gcc-10/changes.html

Signed-off-by: Tomas Korbar <tkorbar@redhat.com>
This commit is contained in:
Tomas Korbar 2020-02-20 07:37:55 +01:00
parent 4eb08d65e2
commit 403242d214
2 changed files with 6 additions and 5 deletions

View File

@ -50,6 +50,7 @@ const char *const PIM_ALL_IGMP_ROUTERS = MCAST_ALL_IGMP_ROUTERS;
DEFINE_MTYPE_STATIC(PIMD, ROUTER, "PIM Router information");
struct pim_router *router = NULL;
struct in_addr qpim_all_pim_routers_addr;
void pim_prefix_list_update(struct prefix_list *plist)
{

View File

@ -131,14 +131,14 @@
#define PIM_UPDATE_SOURCE_DUP -10
#define PIM_GROUP_BAD_ADDR_MASK_COMBO -11
const char *const PIM_ALL_SYSTEMS;
const char *const PIM_ALL_ROUTERS;
const char *const PIM_ALL_PIM_ROUTERS;
const char *const PIM_ALL_IGMP_ROUTERS;
extern const char *const PIM_ALL_SYSTEMS;
extern const char *const PIM_ALL_ROUTERS;
extern const char *const PIM_ALL_PIM_ROUTERS;
extern const char *const PIM_ALL_IGMP_ROUTERS;
extern struct pim_router *router;
extern struct zebra_privs_t pimd_privs;
struct in_addr qpim_all_pim_routers_addr;
extern struct in_addr qpim_all_pim_routers_addr;
extern uint8_t qpim_ecmp_enable;
extern uint8_t qpim_ecmp_rebalance_enable;