Browse Source

pimd: Fixes to build against current quagga.

Everton Marques 5 years ago
parent
commit
ff57d3653e
8 changed files with 15 additions and 19 deletions
  1. 1 0
      configure.ac
  2. 2 0
      doc/Makefile.am
  3. 1 1
      lib/zclient.c
  4. 1 0
      lib/zclient.h
  5. 2 14
      lib/zebra.h
  6. 5 1
      pimd/Makefile.am
  7. 0 1
      pimd/pim_main.c
  8. 3 2
      pimd/pim_signals.c

+ 1 - 0
configure.ac

@@ -1369,6 +1369,7 @@ case "${enable_pimd}" in
   "no" ) PIMD="";;
   *    ) ;;
 esac
+AM_CONDITIONAL(PIMD, test "x$PIMD" = "xpimd")
 
 # XXX Perhaps auto-enable on Solaris, but that's messy for cross builds.
 case "${enable_solaris}" in

+ 2 - 0
doc/Makefile.am

@@ -61,6 +61,8 @@ quagga_TEXINFOS = appendix.texi babeld.texi basic.texi bgpd.texi filter.texi \
 .dia.png:
 	$(DIATOPNG) "$@" $<
 
+man_MANS =
+
 if PIMD
 man_MANS += pimd.8
 endif

+ 1 - 1
lib/zclient.c

@@ -148,7 +148,7 @@ zclient_reset (struct zclient *zclient)
 #ifdef HAVE_TCP_ZEBRA
 
 /* Make socket to zebra daemon. Return zebra socket. */
-static int
+int
 zclient_socket(void)
 {
   int sock;

+ 1 - 0
lib/zclient.h

@@ -132,6 +132,7 @@ extern void zclient_stop (struct zclient *);
 extern void zclient_reset (struct zclient *);
 extern void zclient_free (struct zclient *);
 
+extern int zclient_socket(void);
 extern int  zclient_socket_connect (struct zclient *);
 extern void zclient_serv_path_set  (char *path);
 

+ 2 - 14
lib/zebra.h

@@ -435,20 +435,8 @@ struct in_pktinfo
  */
 #define ZEBRA_HEADER_MARKER              255
 
-/* Zebra route's types. */
-#define ZEBRA_ROUTE_SYSTEM               0
-#define ZEBRA_ROUTE_KERNEL               1
-#define ZEBRA_ROUTE_CONNECT              2
-#define ZEBRA_ROUTE_STATIC               3
-#define ZEBRA_ROUTE_RIP                  4
-#define ZEBRA_ROUTE_RIPNG                5
-#define ZEBRA_ROUTE_OSPF                 6
-#define ZEBRA_ROUTE_OSPF6                7
-#define ZEBRA_ROUTE_ISIS                 8
-#define ZEBRA_ROUTE_BGP                  9
-#define ZEBRA_ROUTE_HSLS		 10
-#define ZEBRA_ROUTE_PIM                  11
-#define ZEBRA_ROUTE_MAX                  12
+/* Zebra route's types are defined in route_types.h */
+#include "route_types.h"
 
 /* Note: whenever a new route-type or zserv-command is added the
  * corresponding {command,route}_types[] table in lib/log.c MUST be

+ 5 - 1
pimd/Makefile.am

@@ -45,7 +45,11 @@ PIM_DEFS += -DPIM_GETTIME_USE_GETTIMEOFDAY
 INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" $(PIM_DEFS)
 INSTALL_SDATA=@INSTALL@ -m 600
-LIBS = @LIBS@ 
+LIBS = @LIBS@
+
+AM_CFLAGS = $(PICFLAGS)
+AM_LDFLAGS = $(PILDFLAGS)
+
 noinst_LIBRARIES = libpim.a
 sbin_PROGRAMS = pimd 
 bin_PROGRAMS = test_igmpv3_join

+ 0 - 1
pimd/pim_main.c

@@ -201,7 +201,6 @@ int main(int argc, char** argv, char** envp) {
   memory_init();
   access_list_init();
   pim_init();
-  sort_node();
 
   /*
    * reset zlog default, then will obey configuration file

+ 3 - 2
pimd/pim_signals.c

@@ -24,6 +24,7 @@
 
 #include <zebra.h>
 #include "sigevent.h"
+#include "memory.h"
 #include "log.h"
 
 #include "pim_signals.h"
@@ -58,7 +59,7 @@ static void pim_sigusr1()
   zlog_rotate (NULL);
 }
 
-struct quagga_signal_t pimd_signals[] =
+static struct quagga_signal_t pimd_signals[] =
 {
   {
    .signal = SIGHUP,
@@ -80,6 +81,6 @@ struct quagga_signal_t pimd_signals[] =
 
 void pim_signals_init()
 {
-  signal_init(master, Q_SIGC(pimd_signals), pimd_signals);
+  signal_init(master, array_size(pimd_signals), pimd_signals);
 }