pimd: Fixes to build against current quagga.
diff --git a/configure.ac b/configure.ac
index 7696bd7..6632e54 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1369,6 +1369,7 @@
"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
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 8869c81..dfc5e40 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -61,6 +61,8 @@
.dia.png:
$(DIATOPNG) "$@" $<
+man_MANS =
+
if PIMD
man_MANS += pimd.8
endif
diff --git a/lib/zclient.c b/lib/zclient.c
index 3b5477e..709d9b9 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -148,7 +148,7 @@
#ifdef HAVE_TCP_ZEBRA
/* Make socket to zebra daemon. Return zebra socket. */
-static int
+int
zclient_socket(void)
{
int sock;
diff --git a/lib/zclient.h b/lib/zclient.h
index a660bbf..b0b7644 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -132,6 +132,7 @@
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);
diff --git a/lib/zebra.h b/lib/zebra.h
index 67d714c..57e591f 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -435,20 +435,8 @@
*/
#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
diff --git a/pimd/Makefile.am b/pimd/Makefile.am
index ef5cffa..70c5096 100644
--- a/pimd/Makefile.am
+++ b/pimd/Makefile.am
@@ -45,7 +45,11 @@
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
diff --git a/pimd/pim_main.c b/pimd/pim_main.c
index 51e5e36..64d7787 100644
--- a/pimd/pim_main.c
+++ b/pimd/pim_main.c
@@ -201,7 +201,6 @@
memory_init();
access_list_init();
pim_init();
- sort_node();
/*
* reset zlog default, then will obey configuration file
diff --git a/pimd/pim_signals.c b/pimd/pim_signals.c
index 1b146f6..d1350b0 100644
--- a/pimd/pim_signals.c
+++ b/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 @@
zlog_rotate (NULL);
}
-struct quagga_signal_t pimd_signals[] =
+static struct quagga_signal_t pimd_signals[] =
{
{
.signal = SIGHUP,
@@ -80,6 +81,6 @@
void pim_signals_init()
{
- signal_init(master, Q_SIGC(pimd_signals), pimd_signals);
+ signal_init(master, array_size(pimd_signals), pimd_signals);
}