Date: Tue, 13 Jul 2010 09:30:05 GMT From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/148524: net/mtr 0.79 -- RES_INIT macro conflict and unused variables on systems w/out IPv6 Message-ID: <201007130930.o6D9U5Lo019856@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/148524; it has been noted by GNATS. From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: Sunpoet Po-Chuan Hsieh <sunpoet@sunpoet.net> Cc: bug-followup@FreeBSD.org, Edwin Groothuis <edwin@FreeBSD.org> 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 |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007130930.o6D9U5Lo019856>