From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Jul 13 09:30:06 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B8E4106566B for ; Tue, 13 Jul 2010 09:30:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E60D48FC17 for ; Tue, 13 Jul 2010 09:30:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o6D9U52D019859 for ; Tue, 13 Jul 2010 09:30:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o6D9U5Lo019856; Tue, 13 Jul 2010 09:30:05 GMT (envelope-from gnats) Date: Tue, 13 Jul 2010 09:30:05 GMT Message-Id: <201007130930.o6D9U5Lo019856@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Jeremy Chadwick Cc: Subject: Re: ports/148524: net/mtr 0.79 -- RES_INIT macro conflict and unused variables on systems w/out IPv6 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jeremy Chadwick List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 09:30:06 -0000 The following reply was made to PR ports/148524; it has been noted by GNATS. From: Jeremy Chadwick To: Sunpoet Po-Chuan Hsieh Cc: bug-followup@FreeBSD.org, Edwin Groothuis Subject: Re: ports/148524: net/mtr 0.79 -- RES_INIT macro conflict and unused variables on systems w/out IPv6 Date: Tue, 13 Jul 2010 02:10:01 -0700 On Tue, Jul 13, 2010 at 01:58:33AM +0800, Sunpoet Po-Chuan Hsieh wrote: > Hi, > > The updated patch is attached. > Thanks for Jeremy's notification to the author. :) > > Regards, > Sunpoet > > --- mtr-0.79.patch begins here --- > diff -ruN --exclude=CVS /usr/ports/net/mtr/Makefile /usr/ports/sunpoet/mtr/Makefile > --- /usr/ports/net/mtr/Makefile 2010-07-12 17:57:40.000000000 +0800 > +++ /usr/ports/sunpoet/mtr/Makefile 2010-07-13 01:55:54.000000000 +0800 > @@ -7,6 +7,7 @@ > > PORTNAME= mtr > PORTVERSION= 0.79 > +PORTREVISION= 1 > CATEGORIES= net ipv6 > MASTER_SITES= ftp://ftp.bitwizard.nl/mtr/ \ > http://mirrors.evolva.ro/util/mtr/ \ > diff -ruN --exclude=CVS /usr/ports/net/mtr/files/patch-dns.c /usr/ports/sunpoet/mtr/files/patch-dns.c > --- /usr/ports/net/mtr/files/patch-dns.c 1970-01-01 08:00:00.000000000 +0800 > +++ /usr/ports/sunpoet/mtr/files/patch-dns.c 2010-07-13 01:25:41.000000000 +0800 > @@ -0,0 +1,26 @@ > +--- dns.c.orig 2010-06-07 14:58:23.000000000 +0800 > ++++ dns.c 2010-07-13 01:25:19.000000000 +0800 > +@@ -310,12 +310,12 @@ > + int use_dns = 1; > + > + #ifdef res_ninit > +-#define RES_INIT() res_ninit(&myres); > ++#define MTR_RES_INIT() res_ninit(&myres); > + #define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \ > + res_nmkquery(&myres, a, b, c, d, e, f, g, h, i) > + struct __res_state myres; > + #else > +-#define RES_INIT() res_init(); > ++#define MTR_RES_INIT() res_init(); > + #define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \ > + res_mkquery(a, b, c, d, e, f, g, h, i) > + #define myres _res > +@@ -495,7 +495,7 @@ > + int option,i; > + > + if (!dns) return; > +- RES_INIT(); > ++ MTR_RES_INIT(); > + if (!myres.nscount) { > + fprintf(stderr,"No nameservers defined.\n"); > + exit(-1); > diff -ruN --exclude=CVS /usr/ports/net/mtr/files/patch-net.c /usr/ports/sunpoet/mtr/files/patch-net.c > --- /usr/ports/net/mtr/files/patch-net.c 1970-01-01 08:00:00.000000000 +0800 > +++ /usr/ports/sunpoet/mtr/files/patch-net.c 2010-07-13 01:26:54.000000000 +0800 > @@ -0,0 +1,13 @@ > +--- net.c.orig 2010-06-07 14:58:25.000000000 +0800 > ++++ net.c 2010-07-13 01:26:43.000000000 +0800 > +@@ -297,8 +297,10 @@ > + > + ttl = index + 1; > + > ++#ifdef ENABLE_IPV6 > + /* offset for ipv6 checksum calculation */ > + int offset = 6; > ++#endif > + > + if ( packetsize < MINPACKET ) packetsize = MINPACKET; > + if ( packetsize > MAXPACKET ) packetsize = MAXPACKET; > --- mtr-0.79.patch ends here --- I should point out that the author of mtr got in touch with me. He's released mtr 0.80 which includes the above fixes, in addition to some others. Probably best to just update the port to 0.80 at this point, then there's no need for the patches. Thanks! -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |