From 4f7a79a97b82ce01823fa79aa0b5237c7e0970c1 Mon Sep 17 00:00:00 2001 From: dholland Date: Thu, 4 Jul 2013 03:41:48 +0000 Subject: Don't print time_t with %lu; it fails on 32-bit netbsd, where time_t is wider than that. PR 47991 from VSYakovetsky. --- net/mtr/Makefile | 3 ++- net/mtr/distinfo | 3 ++- net/mtr/patches/patch-report.c | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 net/mtr/patches/patch-report.c (limited to 'net') diff --git a/net/mtr/Makefile b/net/mtr/Makefile index c54be4eee57..ae217de331b 100644 --- a/net/mtr/Makefile +++ b/net/mtr/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.82 2013/07/03 08:17:16 wiz Exp $ +# $NetBSD: Makefile,v 1.83 2013/07/04 03:41:48 dholland Exp $ DISTNAME= mtr-0.85 +PKGREVISION= 1 CATEGORIES= net MASTER_SITES= ftp://ftp.bitwizard.nl/mtr/ diff --git a/net/mtr/distinfo b/net/mtr/distinfo index 7ae38a4a0fd..c696da9a327 100644 --- a/net/mtr/distinfo +++ b/net/mtr/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.37 2013/07/03 08:17:16 wiz Exp $ +$NetBSD: distinfo,v 1.38 2013/07/04 03:41:48 dholland Exp $ SHA1 (mtr-0.85.tar.gz) = 77204a1a577cfca30c79c43a8fa3daafd280f1b8 RMD160 (mtr-0.85.tar.gz) = 0ca692799d3b4d4358d02f72787e8705c061c817 Size (mtr-0.85.tar.gz) = 534196 bytes +SHA1 (patch-report.c) = 13c834fa841bce84aadc57124b6de6ffbc8766e9 diff --git a/net/mtr/patches/patch-report.c b/net/mtr/patches/patch-report.c new file mode 100644 index 00000000000..9c609f4e2ce --- /dev/null +++ b/net/mtr/patches/patch-report.c @@ -0,0 +1,20 @@ +$NetBSD: patch-report.c,v 1.1 2013/07/04 03:41:48 dholland Exp $ + +Don't print time_t with %lu; it fails on 32-bit netbsd, where time_t is +wider than that. + +--- report.c~ 2013-05-13 15:22:54.000000000 +0000 ++++ report.c +@@ -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); + } + -- cgit v1.2.3