]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Make frr able to be built by gcc 10
authorTomas Korbar <tkorbar@redhat.com>
Thu, 20 Feb 2020 06:37:55 +0000 (07:37 +0100)
committerDavid Lamparter <equinox@diac24.net>
Thu, 23 Apr 2020 17:13:46 +0000 (19:13 +0200)
- 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>
(cherry picked from commit 403242d214b6cb919ed08f2149d7bee77a060947)

pimd/pimd.c
pimd/pimd.h

index 889a83a136bdaec25bc9bf9214c2e3f34b368f18..0a7ac3b31fa306220b60b874c6a6f9df595d9a21 100644 (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)
 {
index 3b83d3b6c7df16b43f550ac81258f6a7fe94390a..a766eac8e2b1c50aa3300d13bb4284ec6b3555a4 100644 (file)
 #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;