]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: Adding SUPPORT_OSPF_API define in ospf_spf.c
authorMichal Ruprich <michalruprich@gmail.com>
Tue, 6 Sep 2022 10:25:01 +0000 (12:25 +0200)
committerMichal Ruprich <michalruprich@gmail.com>
Tue, 6 Sep 2022 10:34:15 +0000 (12:34 +0200)
It is not possible to build ospf_spf.c file with --disable-ospfapi because
ospf_apiserver.c has SUPPORT_OSPF_API around all function definitions and
that results in an undefined reference to the ospf_apiserver_notify_reachable
function error while building.

Signed-off-by: Michal Ruprich <mruprich@redhat.com>
ospfd/ospf_spf.c

index 46492ff6b06145ad29cf3f9929e8990da4f11fdf..4edc1de8119e719ee6b74ff1d18333a05ef716ae 100644 (file)
 #include "ospfd/ospf_sr.h"
 #include "ospfd/ospf_ti_lfa.h"
 #include "ospfd/ospf_errors.h"
+
+#ifdef SUPPORT_OSPF_API
 #include "ospfd/ospf_apiserver.h"
+#endif
 
 /* Variables to ensure a SPF scheduled log message is printed only once */
 
@@ -1895,7 +1898,9 @@ static void ospf_spf_calculate_schedule_worker(struct thread *thread)
        /* Update all routers routing table */
        ospf->oall_rtrs = ospf->all_rtrs;
        ospf->all_rtrs = all_rtrs;
+#ifdef SUPPORT_OSPF_API
        ospf_apiserver_notify_reachable(ospf->oall_rtrs, ospf->all_rtrs);
+#endif
 
        /* Free old ABR/ASBR routing table */
        if (ospf->old_rtrs)