pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/mtr Don't print time_t with %lu; it fails on 32-bi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a315e245cec4
branches:  trunk
changeset: 621061:a315e245cec4
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Thu Jul 04 03:41:48 2013 +0000

description:
Don't print time_t with %lu; it fails on 32-bit netbsd, where time_t is
wider than that. PR 47991 from VSYakovetsky.

diffstat:

 net/mtr/Makefile               |   3 ++-
 net/mtr/distinfo               |   3 ++-
 net/mtr/patches/patch-report.c |  20 ++++++++++++++++++++
 3 files changed, 24 insertions(+), 2 deletions(-)

diffs (47 lines):

diff -r d54322f427f0 -r a315e245cec4 net/mtr/Makefile
--- a/net/mtr/Makefile  Thu Jul 04 00:11:39 2013 +0000
+++ b/net/mtr/Makefile  Thu Jul 04 03:41:48 2013 +0000
@@ -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 -r d54322f427f0 -r a315e245cec4 net/mtr/distinfo
--- a/net/mtr/distinfo  Thu Jul 04 00:11:39 2013 +0000
+++ b/net/mtr/distinfo  Thu Jul 04 03:41:48 2013 +0000
@@ -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 -r d54322f427f0 -r a315e245cec4 net/mtr/patches/patch-report.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mtr/patches/patch-report.c    Thu Jul 04 03:41:48 2013 +0000
@@ -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);
+     }
+ 



Home | Main Index | Thread Index | Old Index