On Mon, Nov 18, 2013 at 10:31:54AM +0000, Stuart Henderson wrote: > On 2013/11/17 17:01, David Hill wrote: > > update net/mtr to 0.85. Add --without-glib to prevent picking it up. > > Add patch to use %lld for time_t. > > ah good, this works better than the previous updates I tried which > had problems with, iirc, the new IPv6 nameserver support. > > > + if (fmtinfo != NULL) fmtinfo = trim(fmtinfo); > > +- printf("MTR.%s;%lu;%s;%s;%d;%s;%s;%d", MTR_VERSION, now, "OK", > > Hostname, > > ++ printf("MTR.%s;%lld;%s;%s;%d;%s;%s;%d", MTR_VERSION, now, "OK", > > Hostname, > > + at+1, name, fmtinfo, last); > .. > > +- printf("MTR.%s;%lu;%s;%s;%d;%s;%d", MTR_VERSION, now, "OK", > > Hostname, > > ++ printf("MTR.%s;%lld;%s;%s;%d;%s;%d", MTR_VERSION, now, "OK", > > Hostname, > > + at+1, name, last); > > these aren't quite correct, now should be cast to (long long) as was done > in the diff which was committed upstream > > https://github.com/traviscross/mtr/commit/57f2d65e8fd5.patch > >
New diff, thanks to krw@ and sthen@ for pointing out the missing cast. Index: Makefile =================================================================== RCS file: /cvs/ports/net/mtr/Makefile,v retrieving revision 1.55 diff -u -p -r1.55 Makefile --- Makefile 5 Oct 2013 11:50:00 -0000 1.55 +++ Makefile 18 Nov 2013 13:54:34 -0000 @@ -2,8 +2,7 @@ COMMENT= Matt's traceroute - network diagnostic tool#' -DISTNAME= mtr-0.82 -REVISION= 2 +DISTNAME= mtr-0.85 CATEGORIES= net MAINTAINER= Jakob Schlyter <ja...@openbsd.org> @@ -34,7 +33,8 @@ WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gi WANTLIB += gtk-x11-2.0 pango-1.0 pangocairo-1.0 pangoft2-1.0 pixman-1 WANTLIB += png pthread pthread-stubs xcb xcb-render xcb-shm z .else -CONFIGURE_ARGS+= --without-gtk +CONFIGURE_ARGS+= --without-glib \ + --without-gtk .endif .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/net/mtr/distinfo,v retrieving revision 1.14 diff -u -p -r1.14 distinfo --- distinfo 29 May 2012 23:43:47 -0000 1.14 +++ distinfo 18 Nov 2013 13:54:34 -0000 @@ -1,5 +1,2 @@ -MD5 (mtr-0.82.tar.gz) = EGAepUP9o+UVRcS84ZW2TA== -RMD160 (mtr-0.82.tar.gz) = 3WCJYQcOF+s7TReuxMZn0LR06RM= -SHA1 (mtr-0.82.tar.gz) = 8TGd4nMk2FiYqd8KKTpDi7qqErU= -SHA256 (mtr-0.82.tar.gz) = 87RXyWI64DVlaIp//UnUhDpeJQXMrzuo2fvYbjzptqA= -SIZE (mtr-0.82.tar.gz) = 270245 +SHA256 (mtr-0.85.tar.gz) = bWNy4V3Tdj1r6u6KIfAebpGG+vbtIPawUpkOGiv6Gcs= +SIZE (mtr-0.85.tar.gz) = 217868 Index: patches/patch-gtk_c =================================================================== RCS file: /cvs/ports/net/mtr/patches/patch-gtk_c,v retrieving revision 1.3 diff -u -p -r1.3 patch-gtk_c --- patches/patch-gtk_c 1 Apr 2013 14:08:26 -0000 1.3 +++ patches/patch-gtk_c 18 Nov 2013 13:54:34 -0000 @@ -3,8 +3,8 @@ $OpenBSD: patch-gtk_c,v 1.3 2013/04/01 1 Fix 64-bit issue. Fix with newer glib. ---- gtk.c.orig Mon Feb 14 08:50:59 2011 -+++ gtk.c Mon Apr 1 14:50:24 2013 +--- gtk.c.orig Mon Apr 29 14:22:05 2013 ++++ gtk.c Sun Nov 17 16:44:55 2013 @@ -21,6 +21,7 @@ #include <stdio.h> @@ -13,7 +13,7 @@ Fix with newer glib. #include <unistd.h> #include <sys/time.h> #include <sys/types.h> -@@ -70,6 +71,7 @@ void gtk_do_init(int *argc, char ***argv) +@@ -69,6 +70,7 @@ void gtk_do_init(int *argc, char ***argv) static int done = 0; if(!done) { Index: patches/patch-report_c =================================================================== RCS file: patches/patch-report_c diff -N patches/patch-report_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-report_c 18 Nov 2013 13:54:34 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ +--- report.c.orig Mon May 13 11:22:54 2013 ++++ report.c Sun Nov 17 16:45:59 2013 +@@ -343,10 +343,10 @@ void csv_close(time_t now) + if(!ipinfo_no) { + char* fmtinfo = fmt_ipinfo(addr); + if (fmtinfo != NULL) fmtinfo = trim(fmtinfo); +- printf("MTR.%s;%lu;%s;%s;%d;%s;%s;%d", MTR_VERSION, now, "OK", Hostname, ++ printf("MTR.%s;%lld;%s;%s;%d;%s;%s;%d", MTR_VERSION, (long long)now, "OK", Hostname, + at+1, name, fmtinfo, last); + } else { +- printf("MTR.%s;%lu;%s;%s;%d;%s;%d", MTR_VERSION, now, "OK", Hostname, ++ printf("MTR.%s;%lld;%s;%s;%d;%s;%d", MTR_VERSION, (long long)now, "OK", Hostname, + at+1, name, last); + } +