diff -ruN mrouted-3.9beta3+IOS12.orig/Makefile mrouted-3.9beta3+IOS12/Makefile
--- mrouted-3.9beta3+IOS12.orig/Makefile	1998-02-28 19:09:11.000000000 -0800
+++ mrouted-3.9beta3+IOS12/Makefile	2008-10-10 18:31:35.000000000 -0700
@@ -28,11 +28,13 @@
 #RSRRC=		rsrr.c
 #RSRRO=		rsrr.o
 #
+CC=gcc
+YACC=bison -y
 LDFLAGS=
-CFLAGS=		-O ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF}	## SunOS, OSF1, FreeBSD, IRIX
+#CFLAGS=		-O ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF}	## SunOS, OSF1, FreeBSD, IRIX
 #CFLAGS=		-O ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF} -DSYSV -DSUNOS5	## Solaris 2.x
 #LIB2=-lsocket -lnsl	## Solaris 2.x
-#CFLAGS=		-O ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF} -D__BSD_SOURCE -DRAW_INPUT_IS_RAW -DRAW_OUTPUT_IS_RAW -DIOCTL_OK_ON_RAW_SOCKET	## Linux
+CFLAGS=		-O2 -Wall -Wextra -Wno-sign-compare -Wno-pointer-sign ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF} -D__BSD_SOURCE -DRAW_INPUT_IS_RAW -DRAW_OUTPUT_IS_RAW -DIOCTL_OK_ON_RAW_SOCKET	## Linux
 LIBS=		${SNMPLIBDIR} ${SNMPLIBS} ${LIB2}
 LINTFLAGS=	${MCAST_INCLUDE}
 IGMP_SRCS=	igmp.c inet.c kern.c
diff -ruN mrouted-3.9beta3+IOS12.orig/callout.c mrouted-3.9beta3+IOS12/callout.c
--- mrouted-3.9beta3+IOS12.orig/callout.c	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/callout.c	2008-10-10 18:54:33.000000000 -0700
@@ -13,7 +13,7 @@
 #include "defs.h"
 
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 callout.c,v 3.8.4.8 1998/01/06 01:58:45 fenner Exp $";
 #endif
 
diff -ruN mrouted-3.9beta3+IOS12.orig/cfparse.y mrouted-3.9beta3+IOS12/cfparse.y
--- mrouted-3.9beta3+IOS12.orig/cfparse.y	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/cfparse.y	2008-10-10 18:35:32.000000000 -0700
@@ -763,45 +763,45 @@
 	int	val1;
 	int	val2;
 } words[] = {
-	{ "cache_lifetime",	CACHE_LIFETIME },
+	{ "cache_lifetime",	CACHE_LIFETIME, 0 },
 	{ "prune_lifetime",	PRUNE_LIFETIME,	PRUNE_LIFETIME2 },
-	{ "pruning",		PRUNING },
-	{ "phyint",		PHYINT },
-	{ "tunnel",		TUNNEL },
-	{ "disable",		DISABLE },
-	{ "metric",		METRIC },
-	{ "advert_metric",	ADVERT_METRIC },
-	{ "threshold",		THRESHOLD },
-	{ "rate_limit",		RATE_LIMIT },
-	{ "force_leaf",		FORCE_LEAF },
-	{ "srcrt",		SRCRT },
-	{ "sourceroute",	SRCRT },
-	{ "boundary",		BOUNDARY },
-	{ "netmask",		NETMASK },
-	{ "igmpv1",		IGMPV1 },
-	{ "altnet",		ALTNET },
-	{ "name",		NAME },
-	{ "accept",		ACCEPT },
-	{ "deny",		DENY },
-	{ "exact",		EXACT },
-	{ "bidir",		BIDIR },
-	{ "allow_nonpruners",	ALLOW_NONPRUNERS },
+	{ "pruning",		PRUNING, 0 },
+	{ "phyint",		PHYINT, 0 },
+	{ "tunnel",		TUNNEL, 0 },
+	{ "disable",		DISABLE, 0 },
+	{ "metric",		METRIC, 0 },
+	{ "advert_metric",	ADVERT_METRIC, 0 },
+	{ "threshold",		THRESHOLD, 0 },
+	{ "rate_limit",		RATE_LIMIT, 0 },
+	{ "force_leaf",		FORCE_LEAF, 0 },
+	{ "srcrt",		SRCRT, 0 },
+	{ "sourceroute",	SRCRT, 0 },
+	{ "boundary",		BOUNDARY, 0 },
+	{ "netmask",		NETMASK, 0 },
+	{ "igmpv1",		IGMPV1, 0 },
+	{ "altnet",		ALTNET, 0 },
+	{ "name",		NAME, 0 },
+	{ "accept",		ACCEPT, 0 },
+	{ "deny",		DENY, 0 },
+	{ "exact",		EXACT, 0 },
+	{ "bidir",		BIDIR, 0 },
+	{ "allow_nonpruners",	ALLOW_NONPRUNERS, 0 },
 #ifdef ALLOW_BLACK_HOLES
-	{ "allow_black_holes",	BLACK_HOLE },
+	{ "allow_black_holes",	BLACK_HOLE, 0 },
 #endif
-	{ "noflood",		NOFLOOD, NOFLOOD2},
-	{ "notransit",		NOTRANSIT },
-	{ "blaster",		BLASTER },
+	{ "noflood",		NOFLOOD, NOFLOOD2 },
+	{ "notransit",		NOTRANSIT, 0 },
+	{ "blaster",		BLASTER, 0 },
 	{ "rexmit_prunes",	REXMIT_PRUNES, REXMIT_PRUNES2 },
-	{ "passive",		PASSIVE },
-	{ "beside",		BESIDE },
+	{ "passive",		PASSIVE, 0 },
+	{ "beside",		BESIDE, 0 },
 #ifdef SNMP
-	{ "sysName",		SYSNAM },
-	{ "sysContact",		SYSCONTACT },
-	{ "sysVersion",		SYSVERSION },
-	{ "sysLocation",	SYSLOCATION },
+	{ "sysName",		SYSNAM, 0 },
+	{ "sysContact",		SYSCONTACT, 0 },
+	{ "sysVersion",		SYSVERSION, 0 },
+	{ "sysLocation",	SYSLOCATION, 0 },
 #endif
-	{ NULL,			0 }
+	{ NULL,			0, 0 }
 };
 
 
@@ -907,7 +907,6 @@
     struct ifconf *ifcp;
     u_int32 a;
 {
-    int n;
     struct ifreq *ifrp = (struct ifreq *)ifcp->ifc_buf;
     struct ifreq *ifend = (struct ifreq *)((char *)ifrp + ifcp->ifc_len);
 
diff -ruN mrouted-3.9beta3+IOS12.orig/config.c mrouted-3.9beta3+IOS12/config.c
--- mrouted-3.9beta3+IOS12.orig/config.c	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/config.c	2008-10-10 18:39:21.000000000 -0700
@@ -14,7 +14,7 @@
 #include "defs.h"
 
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 config.c,v 3.8.4.10 1998/01/06 01:57:41 fenner Exp $";
 #endif
 
diff -ruN mrouted-3.9beta3+IOS12.orig/defs.h mrouted-3.9beta3+IOS12/defs.h
--- mrouted-3.9beta3+IOS12.orig/defs.h	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/defs.h	2008-10-10 18:45:45.000000000 -0700
@@ -26,7 +26,7 @@
 #ifdef SYSV
 #include <sys/sockio.h>
 #endif
-#ifdef _AIX
+#if defined(_AIX) || defined(__linux__)
 #include <time.h>
 #endif
 #include <sys/time.h>
@@ -45,7 +45,11 @@
 #undef rtentry
 #endif
 #endif
-#include <netinet/ip_mroute.h>
+#ifdef __linux__
+# include <linux/mroute.h>
+#else
+# include <netinet/ip_mroute.h>
+#endif
 #ifdef RSRR
 #include <sys/un.h>
 #endif /* RSRR */
@@ -61,7 +65,7 @@
 #endif
 #endif
 
-typedef void (*cfunc_t) __P((void *));
+typedef void (*cfunc_t) __P((void*));
 typedef void (*ihfunc_t) __P((int, fd_set *));
 
 #include "dvmrp.h"
@@ -177,7 +181,7 @@
 extern char		s3[];
 extern char		s4[];
 
-#if !(defined(BSD) && (BSD >= 199103))
+#if !(defined(BSD) && (BSD >= 199103)) && !defined(__linux__)
 extern int		errno;
 extern int		sys_nerr;
 extern char *		sys_errlist[];
@@ -407,3 +411,9 @@
 extern void		rsrr_cache_send __P((struct gtable *, int));
 extern void		rsrr_cache_clean __P((struct gtable *));
 #endif /* RSRR */
+
+#ifdef __GNUC__
+# define UNUSED __attribute__((unused))
+#else
+# define UNUSED /*empty*/
+#endif
diff -ruN mrouted-3.9beta3+IOS12.orig/icmp.c mrouted-3.9beta3+IOS12/icmp.c
--- mrouted-3.9beta3+IOS12.orig/icmp.c	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/icmp.c	2008-10-10 18:54:11.000000000 -0700
@@ -13,7 +13,7 @@
 #include "defs.h"
 
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 icmp.c,v 3.8.4.2 1998/01/06 01:57:42 fenner Exp $";
 #endif
 
@@ -36,8 +36,8 @@
 
 static void
 icmp_handler(fd, rfds)
-    int fd;
-    fd_set *rfds;
+    int UNUSED fd;
+    fd_set UNUSED *rfds;
 {
     u_char icmp_buf[RECV_BUF_SIZE];
     struct sockaddr_in from;
diff -ruN mrouted-3.9beta3+IOS12.orig/igmp.c mrouted-3.9beta3+IOS12/igmp.c
--- mrouted-3.9beta3+IOS12.orig/igmp.c	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/igmp.c	2008-10-10 18:39:23.000000000 -0700
@@ -14,7 +14,7 @@
 #include "defs.h"
 
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 igmp.c,v 3.8.4.19 1998/01/06 01:57:43 fenner Exp $";
 #endif
 
diff -ruN mrouted-3.9beta3+IOS12.orig/inet.c mrouted-3.9beta3+IOS12/inet.c
--- mrouted-3.9beta3+IOS12.orig/inet.c	1998-01-05 17:57:44.000000000 -0800
+++ mrouted-3.9beta3+IOS12/inet.c	2008-10-10 18:38:05.000000000 -0700
@@ -14,7 +14,7 @@
 #include "defs.h"
 
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 inet.c,v 3.8.4.2 1998/01/06 01:57:44 fenner Exp $";
 #endif
 
diff -ruN mrouted-3.9beta3+IOS12.orig/ipip.c mrouted-3.9beta3+IOS12/ipip.c
--- mrouted-3.9beta3+IOS12.orig/ipip.c	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/ipip.c	2008-10-10 18:54:11.000000000 -0700
@@ -14,7 +14,7 @@
 #include "defs.h"
 
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 ipip.c,v 3.8.4.6 1998/01/06 01:57:45 fenner Exp $";
 #endif
 
diff -ruN mrouted-3.9beta3+IOS12.orig/kern.c mrouted-3.9beta3+IOS12/kern.c
--- mrouted-3.9beta3+IOS12.orig/kern.c	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/kern.c	2008-10-10 18:39:22.000000000 -0700
@@ -14,7 +14,7 @@
 #include "defs.h"
 
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 kern.c,v 3.8.4.10 1998/01/06 02:00:51 fenner Exp $";
 #endif
 
diff -ruN mrouted-3.9beta3+IOS12.orig/main.c mrouted-3.9beta3+IOS12/main.c
--- mrouted-3.9beta3+IOS12.orig/main.c	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/main.c	2008-10-10 18:56:17.000000000 -0700
@@ -33,7 +33,7 @@
 #endif
 
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 main.c,v 3.8.4.29 1998/03/01 01:49:00 fenner Exp $";
 #endif
 
@@ -107,9 +107,9 @@
  * Forward declarations.
  */
 static void final_init __P((void *));
-static void fasttimer __P((void *));
-static void timer __P((void *));
-static void dump __P((void));
+static void fasttimer __P((void*));
+static void timer __P((void*));
+static void dump __P((void)) UNUSED;
 static void dump_version __P((FILE *));
 static void fdump __P((void));
 static void cdump __P((void));
@@ -375,7 +375,6 @@
 	/*
 	 * Detach from the terminal
 	 */
-	int t;
 
 	haveterminal = 0;
 	if (fork()) exit(0);
@@ -584,8 +583,8 @@
  * do all the other time-based processing.
  */
 static void
-fasttimer(i)
-    void *i;
+fasttimer(p)
+    void UNUSED *p;
 {
     static unsigned int tlast;
     static unsigned int nsent;
@@ -644,8 +643,8 @@
  * virtual interface data structures.
  */
 static void
-timer(i)
-    void *i;
+timer(p)
+    void UNUSED *p;
 {
     age_routes();	/* Advance the timers in the route entries     */
     age_vifs();		/* Advance the timers for neighbors */
@@ -697,7 +696,7 @@
 static void
 cleanup()
 {
-    static in_cleanup = 0;
+    static int in_cleanup = 0;
 
     if (!in_cleanup) {
 	in_cleanup++;
@@ -999,10 +998,8 @@
 		    thyme->tm_min, thyme->tm_sec, now.tv_usec / 1000, msg);
 	if (syserr == 0)
 	    fprintf(stderr, "\n");
-	else if (syserr < sys_nerr)
-	    fprintf(stderr, ": %s\n", sys_errlist[syserr]);
 	else
-	    fprintf(stderr, ": errno %d\n", syserr);
+	    fprintf(stderr, ": %s\n", strerror(syserr));
     }
 
     /*
diff -ruN mrouted-3.9beta3+IOS12.orig/mapper.c mrouted-3.9beta3+IOS12/mapper.c
--- mrouted-3.9beta3+IOS12.orig/mapper.c	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/mapper.c	2008-10-10 18:56:11.000000000 -0700
@@ -33,7 +33,7 @@
 #endif
 
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 mapper.c,v 3.8.4.3 1998/01/06 01:57:47 fenner Exp $";
 #endif
 
@@ -197,10 +197,8 @@
 	    vfprintf(stderr, fmt, ap);
 	    if (syserr == 0)
 		fprintf(stderr, "\n");
-	    else if (syserr < sys_nerr)
-		fprintf(stderr, ": %s\n", sys_errlist[syserr]);
 	    else
-		fprintf(stderr, ": errno %d\n", syserr);
+	        fprintf(stderr, ": %s\n", strerror(syserr));
     }
 
     if (severity <= LOG_ERR)
@@ -230,8 +228,8 @@
  * Process an incoming group membership report.
  */
 void accept_group_report(src, dst, group, r_type)
-    u_int32 src, dst, group;
-    int r_type;
+    u_int32 src, dst, UNUSED group;
+    int UNUSED r_type;
 {
     mrlog(LOG_INFO, 0, "ignoring IGMP group membership report from %s to %s",
 	inet_fmt(src, s1), inet_fmt(dst, s2));
@@ -242,9 +240,9 @@
  * Process an incoming neighbor probe message.
  */
 void accept_probe(src, dst, p, datalen, level)
-    u_int32 src, dst, level;
-    char *p;
-    int datalen;
+    u_int32 src, dst, UNUSED level;
+    char UNUSED *p;
+    int UNUSED datalen;
 {
     mrlog(LOG_INFO, 0, "ignoring DVMRP probe from %s to %s",
 	inet_fmt(src, s1), inet_fmt(dst, s2));
@@ -255,9 +253,9 @@
  * Process an incoming route report message.
  */
 void accept_report(src, dst, p, datalen, level)
-    u_int32 src, dst, level;
-    char *p;
-    int datalen;
+    u_int32 src, dst, UNUSED level;
+    char UNUSED *p;
+    int UNUSED datalen;
 {
     mrlog(LOG_INFO, 0, "ignoring DVMRP routing report from %s to %s",
 	inet_fmt(src, s1), inet_fmt(dst, s2));
@@ -290,7 +288,7 @@
  * Process an incoming neighbor-list message.
  */
 void accept_neighbors(src, dst, p, datalen, level)
-    u_int32 src, dst, level;
+    u_int32 src, UNUSED dst, level;
     u_char *p;
     int datalen;
 {
@@ -451,7 +449,7 @@
 }
 
 void accept_neighbors2(src, dst, p, datalen, level)
-    u_int32 src, dst, level;
+    u_int32 src, UNUSED dst, level;
     u_char *p;
     int datalen;
 {
@@ -989,52 +987,52 @@
 
 /* dummies */
 void accept_prune(src, dst, p, datalen)
-	u_int32 src, dst;
-	char *p;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst;
+	char UNUSED *p;
+	int UNUSED datalen;
 {
 }
 void accept_graft(src, dst, p, datalen)
-	u_int32 src, dst;
-	char *p;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst;
+	char UNUSED *p;
+	int UNUSED datalen;
 {
 }
 void accept_g_ack(src, dst, p, datalen)
-	u_int32 src, dst;
-	char *p;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst;
+	char UNUSED *p;
+	int UNUSED datalen;
 {
 }
 void add_table_entry(origin, mcastgrp)
-	u_int32 origin, mcastgrp;
+	u_int32 UNUSED origin, UNUSED mcastgrp;
 {
 }
 void accept_leave_message(src, dst, group)
-	u_int32 src, dst, group;
+	u_int32 UNUSED src, UNUSED dst, UNUSED group;
 {
 }
 void accept_mtrace(src, dst, group, data, no, datalen)
-	u_int32 src, dst, group;
-	char *data;
-	u_int no;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst, UNUSED group;
+	char UNUSED *data;
+	u_int UNUSED no;
+	int UNUSED datalen;
 {
 }
 void accept_membership_query(src, dst, group, tmo)
-	u_int32 src, dst, group;
-	int tmo;
+	u_int32 UNUSED src, UNUSED dst, UNUSED group;
+	int UNUSED tmo;
 {
 }
 void accept_info_request(src, dst, p, datalen)
-	u_int32 src, dst;
-	u_char *p;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst;
+	u_char UNUSED *p;
+	int UNUSED datalen;
 {
 }
 void accept_info_reply(src, dst, p, datalen)
-	u_int32 src, dst;
-	u_char *p;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst;
+	u_char UNUSED *p;
+	int UNUSED datalen;
 {
 }
diff -ruN mrouted-3.9beta3+IOS12.orig/mrinfo.c mrouted-3.9beta3+IOS12/mrinfo.c
--- mrouted-3.9beta3+IOS12.orig/mrinfo.c	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/mrinfo.c	2008-10-10 18:56:17.000000000 -0700
@@ -59,14 +59,15 @@
  * These notices must be retained in any copies of any part of this software.
  */
 
+#include "defs.h"
+
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 mrinfo.c,v 3.8.4.7 1998/03/01 03:05:20 fenner Exp $";
 #endif
 
 #include <netdb.h>
 #include <sys/time.h>
-#include "defs.h"
 #include <arpa/inet.h>
 #ifdef __STDC__
 #include <stdarg.h>
@@ -159,10 +160,8 @@
 		vfprintf(stderr, fmt, ap);
 		if (syserr == 0)
 			fprintf(stderr, "\n");
-		else if (syserr < sys_nerr)
-			fprintf(stderr, ": %s\n", sys_errlist[syserr]);
 		else
-			fprintf(stderr, ": errno %d\n", syserr);
+			fprintf(stderr, ": %s\n", strerror(syserr));
 	}
 
 	if (severity <= LOG_ERR)
@@ -193,7 +192,7 @@
  */
 void 
 accept_neighbors(src, dst, p, datalen, level)
-	u_int32	src, dst, level;
+	u_int32	src, UNUSED dst, UNUSED level;
 	u_char	*p;
 	int     datalen;
 {
@@ -226,7 +225,7 @@
 
 void 
 accept_neighbors2(src, dst, p, datalen, level)
-	u_int32	src, dst, level;
+	u_int32	src, UNUSED dst, level;
 	u_char	*p;
 	int     datalen;
 {
@@ -558,80 +557,80 @@
 
 /* dummies */
 void accept_probe(src, dst, p, datalen, level)
-	u_int32 src, dst, level;
-	char *p;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst, UNUSED level;
+	char UNUSED *p;
+	int UNUSED datalen;
 {
 }
 void accept_group_report(src, dst, group, r_type)
-	u_int32 src, dst, group;
-	int r_type;
+	u_int32 UNUSED src, UNUSED dst, UNUSED group;
+	int UNUSED r_type;
 {
 }
 void accept_neighbor_request2(src, dst)
-	u_int32 src, dst;
+	u_int32 UNUSED src, UNUSED dst;
 {
 }
 void accept_report(src, dst, p, datalen, level)
-	u_int32 src, dst, level;
-	char *p;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst, UNUSED level;
+	char UNUSED *p;
+	int UNUSED datalen;
 {
 }
 void accept_neighbor_request(src, dst)
-	u_int32 src, dst;
+	u_int32 UNUSED src, UNUSED dst;
 {
 }
 void accept_prune(src, dst, p, datalen)
-	u_int32 src, dst;
-	char *p;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst;
+	char UNUSED *p;
+	int UNUSED datalen;
 {
 }
 void accept_graft(src, dst, p, datalen)
-	u_int32 src, dst;
-	char *p;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst;
+	char UNUSED *p;
+	int UNUSED datalen;
 {
 }
 void accept_g_ack(src, dst, p, datalen)
-	u_int32 src, dst;
-	char *p;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst;
+	char UNUSED *p;
+	int UNUSED datalen;
 {
 }
 void add_table_entry(origin, mcastgrp)
-	u_int32 origin, mcastgrp;
+	u_int32 UNUSED origin, UNUSED mcastgrp;
 {
 }
 void check_vif_state()
 {
 }
 void accept_leave_message(src, dst, group)
-	u_int32 src, dst, group;
+	u_int32 UNUSED src, UNUSED dst, UNUSED group;
 {
 }
 void accept_mtrace(src, dst, group, data, no, datalen)
-	u_int32 src, dst, group;
-	char *data;
-	u_int no;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst, UNUSED group;
+	char UNUSED *data;
+	u_int UNUSED no;
+	int UNUSED datalen;
 {
 }
 void accept_membership_query(src, dst, group, tmo)
-	u_int32 src, dst, group;
-	int tmo;
+	u_int32 UNUSED src, UNUSED dst, UNUSED group;
+	int UNUSED tmo;
 {
 }
 void accept_info_request(src, dst, p, datalen)
-	u_int32 src, dst;
-	u_char *p;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst;
+	u_char UNUSED *p;
+	int UNUSED datalen;
 {
 }
 void accept_info_reply(src, dst, p, datalen)
-	u_int32 src, dst;
-	u_char *p;
-	int datalen;
+	u_int32 UNUSED src, UNUSED dst;
+	u_char UNUSED *p;
+	int UNUSED datalen;
 {
 }
diff -ruN mrouted-3.9beta3+IOS12.orig/prune.c mrouted-3.9beta3+IOS12/prune.c
--- mrouted-3.9beta3+IOS12.orig/prune.c	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/prune.c	2008-10-10 18:54:11.000000000 -0700
@@ -14,7 +14,7 @@
 #include "defs.h"
 
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 prune.c,v 3.8.4.59 1998/03/01 02:06:32 fenner Exp $";
 #endif
 
@@ -546,13 +546,14 @@
 	send_on_vif(&uvifs[vifi], dst, DVMRP_GRAFT_ACK, datalen);
     }
 
-    IF_DEBUG(DEBUG_PRUNE)
+    IF_DEBUG(DEBUG_PRUNE) {
     if (vifi == NO_VIF)
 	mrlog(LOG_DEBUG, 0, "sent graft ack for (%s, %s) to %s",
 	    inet_fmt(origin, s1), inet_fmt(grp, s2), inet_fmt(dst, s3));
     else
 	mrlog(LOG_DEBUG, 0, "sent graft ack for (%s, %s) to %s on vif %d",
 	    inet_fmt(origin, s1), inet_fmt(grp, s2), inet_fmt(dst, s3), vifi);
+    }
 }
 
 /*
@@ -2371,7 +2372,7 @@
 
     /* determine the routing table entry for this traceroute */
     rt = determine_route(qry->tr_src);
-    IF_DEBUG(DEBUG_TRACE)
+    IF_DEBUG(DEBUG_TRACE) {
     if (rt) {
 	mrlog(LOG_DEBUG, 0, "rt parent vif: %d rtr: %s metric: %d",
 		rt->rt_parent, inet_fmt(rt->rt_gateway, s1), rt->rt_metric);
@@ -2379,6 +2380,7 @@
 		RT_FMT(rt, s1));
     } else
 	mrlog(LOG_DEBUG, 0, "...no route");
+    }
 
     /*
      * Query type packet - check if rte exists 
@@ -2519,13 +2521,14 @@
 	    resp->tr_rflags = TR_SCOPED;
 	else if (gt->gt_prsent_timer)
 	    resp->tr_rflags = TR_PRUNED;
-	else if (!VIFM_ISSET(vifi, gt->gt_grpmems))
+	else if (!VIFM_ISSET(vifi, gt->gt_grpmems)) {
 	    if (!NBRM_ISEMPTY(uvifs[vifi].uv_nbrmap) &&
 		SUBS_ARE_PRUNED(rt->rt_subordinates,
 				uvifs[vifi].uv_nbrmap, gt->gt_prunes))
 		resp->tr_rflags = TR_OPRUNED;
 	    else
 		resp->tr_rflags = TR_NO_FWD;
+	}
     } else {
 	if ((vifi != NO_VIF && scoped_addr(vifi, group)) ||
 	    (rt && scoped_addr(rt->rt_parent, group)))
diff -ruN mrouted-3.9beta3+IOS12.orig/route.c mrouted-3.9beta3+IOS12/route.c
--- mrouted-3.9beta3+IOS12.orig/route.c	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/route.c	2008-10-10 18:45:45.000000000 -0700
@@ -14,7 +14,7 @@
 #include "defs.h"
 
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 route.c,v 3.8.4.41 1998/01/15 00:08:34 fenner Exp $";
 #endif
 
@@ -1052,13 +1052,14 @@
 	return;
     }
 
-    if (uvifs[vifi].uv_flags & VIFF_BLASTER)
+    if (uvifs[vifi].uv_flags & VIFF_BLASTER) {
 	if (datalen > 0) {
 	    queue_blaster_report(vifi, src, dst, p, datalen, level);
 	    return;
 	} else {
 	    datalen = -datalen;
 	}
+    }
 
     if (!(nbr = update_neighbor(vifi, src, DVMRP_REPORT, NULL, 0, level)))
 	return;
@@ -1249,7 +1250,7 @@
     int which_routes;
     register struct rtentry *start_rt;
     vifi_t vifi;
-    u_int32 dst;
+    u_int32 UNUSED dst;
 {
     register struct rtentry *r;
     register char *p;
diff -ruN mrouted-3.9beta3+IOS12.orig/vers.c mrouted-3.9beta3+IOS12/vers.c
--- mrouted-3.9beta3+IOS12.orig/vers.c	1969-12-31 16:00:00.000000000 -0800
+++ mrouted-3.9beta3+IOS12/vers.c	2008-10-10 18:30:07.000000000 -0700
@@ -0,0 +1 @@
+char todaysversion[]="3.9-beta3+IOS12";
Binary files mrouted-3.9beta3+IOS12.orig/vers.o and mrouted-3.9beta3+IOS12/vers.o differ
diff -ruN mrouted-3.9beta3+IOS12.orig/vif.c mrouted-3.9beta3+IOS12/vif.c
--- mrouted-3.9beta3+IOS12.orig/vif.c	2008-10-15 12:15:00.000000000 -0700
+++ mrouted-3.9beta3+IOS12/vif.c	2008-10-10 18:45:45.000000000 -0700
@@ -15,7 +15,7 @@
 #include <fcntl.h>
 
 #ifndef lint
-static char rcsid[] = "@(#) $Id: \
+static char UNUSED rcsid[] = "@(#) $Id: \
 vif.c,v 3.8.4.56.2.1 1999/01/20 05:18:50 fenner Exp $";
 #endif
 
@@ -901,7 +901,7 @@
  */
 void
 accept_neighbor_request(src, dst)
-    u_int32 src, dst;
+    u_int32 src, UNUSED dst;
 {
     vifi_t vifi;
     struct uvif *v;
@@ -962,7 +962,7 @@
  */
 void
 accept_neighbor_request2(src, dst)
-    u_int32 src, dst;
+    u_int32 src, UNUSED dst;
 {
     vifi_t vifi;
     struct uvif *v;
@@ -1060,7 +1060,7 @@
 
 void
 accept_info_request(src, dst, p, datalen)
-    u_int32 src, dst;
+    u_int32 src, UNUSED dst;
     u_char *p;
     int datalen;
 {
@@ -1126,9 +1126,9 @@
  */
 void
 accept_neighbors(src, dst, p, datalen, level)
-    u_int32 src, dst, level;
-    u_char *p;
-    int datalen;
+    u_int32 src, dst, UNUSED level;
+    u_char UNUSED *p;
+    int UNUSED datalen;
 {
     mrlog(LOG_INFO, 0, "ignoring spurious DVMRP neighbor list from %s to %s",
 	inet_fmt(src, s1), inet_fmt(dst, s2));
@@ -1140,9 +1140,9 @@
  */
 void
 accept_neighbors2(src, dst, p, datalen, level)
-    u_int32 src, dst, level;
-    u_char *p;
-    int datalen;
+    u_int32 src, dst, UNUSED level;
+    u_char UNUSED *p;
+    int UNUSED datalen;
 {
     IF_DEBUG(DEBUG_PKT)
     mrlog(LOG_DEBUG, 0, "ignoring spurious DVMRP neighbor list2 from %s to %s",
@@ -1155,8 +1155,8 @@
 void
 accept_info_reply(src, dst, p, datalen)
     u_int32 src, dst;
-    u_char *p;
-    int datalen;
+    u_char UNUSED *p;
+    int UNUSED datalen;
 {
     IF_DEBUG(DEBUG_PKT)
     mrlog(LOG_DEBUG, 0, "ignoring spurious DVMRP info reply from %s to %s",
@@ -1749,7 +1749,7 @@
 					    v->uv_prune_lifetime);
 
 	v_req.vifi = vifi;
-	if (did_final_init)
+	if (did_final_init) {
 	    if (ioctl(udp_socket, SIOCGETVIFCNT, (char *)&v_req) < 0) {
 		mrlog(LOG_WARNING, errno,
 		    "SIOCGETVIFCNT fails on vif %d", vifi);
@@ -1759,6 +1759,7 @@
 		fprintf(fp, "                   pkts/bytes out: %lu/%lu\n",
 			v_req.ocount, v_req.obytes);
 	    }
+	}
 	fprintf(fp, "\n");
     }
     fprintf(fp, "\n");
