summaryrefslogtreecommitdiff
path: root/net/pload
diff options
context:
space:
mode:
authorshattered <shattered@pkgsrc.org>2009-01-04 20:03:21 +0000
committershattered <shattered@pkgsrc.org>2009-01-04 20:03:21 +0000
commit03500450169fab73a04beffd0a4375b7bd3cf0c5 (patch)
tree08cceb025dbc642197ee22bf9c69b0a567ecc47f /net/pload
parent9a3ea29551c08f3d460cc1f764b35a1dbbf3c4fe (diff)
downloadpkgsrc-03500450169fab73a04beffd0a4375b7bd3cf0c5.tar.gz
Store traffic counters in u_quad_t to avoid overflow. Closes PR 38168.
Take maintainership. OK by wiz@.
Diffstat (limited to 'net/pload')
-rw-r--r--net/pload/Makefile6
-rw-r--r--net/pload/distinfo4
-rw-r--r--net/pload/patches/patch-ad22
-rw-r--r--net/pload/patches/patch-ae28
4 files changed, 56 insertions, 4 deletions
diff --git a/net/pload/Makefile b/net/pload/Makefile
index 86f6e944d7b..90ed08324a5 100644
--- a/net/pload/Makefile
+++ b/net/pload/Makefile
@@ -1,12 +1,12 @@
-# $NetBSD: Makefile,v 1.22 2008/11/10 17:21:37 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2009/01/04 20:03:21 shattered Exp $
#
DISTNAME= pload-0.9.5
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= net x11
MASTER_SITES= ${MASTER_SITE_SUNSITE:=system/network/serial/ppp/}
-MAINTAINER= pkgsrc-users@NetBSD.org
+MAINTAINER= shattered@NetBSD.org
HOMEPAGE= http://web.archive.org/web/20050305142516/http://www.engr.utk.edu/~mdsmith/pload/
COMMENT= PPP monitor for X11, monitoring totals and current in/out rates
diff --git a/net/pload/distinfo b/net/pload/distinfo
index 5f348366632..ddf164f1174 100644
--- a/net/pload/distinfo
+++ b/net/pload/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2007/12/09 23:41:11 wiz Exp $
+$NetBSD: distinfo,v 1.8 2009/01/04 20:03:21 shattered Exp $
SHA1 (pload-0.9.5.tar.gz) = 52e8ca31ad534cbc131d0bd19ef5ae45b5b37777
RMD160 (pload-0.9.5.tar.gz) = 48ff961d760430a3a45533f7023b1fefa252ede8
@@ -6,3 +6,5 @@ Size (pload-0.9.5.tar.gz) = 22423 bytes
SHA1 (patch-aa) = 6a30a15c60e74eeb5312e275b1dac882c86b2420
SHA1 (patch-ab) = 4bf2639b64d20717716c66be85c4fb5cd3b114d5
SHA1 (patch-ac) = 345ac88bb5d279039ae0169c2b468b22964a0c09
+SHA1 (patch-ad) = 97e7f37561882098b080683237e661f2f5692025
+SHA1 (patch-ae) = d98a346e56d36eb5efd084eef1a95ca6c350c0f5
diff --git a/net/pload/patches/patch-ad b/net/pload/patches/patch-ad
new file mode 100644
index 00000000000..ad47ae93d27
--- /dev/null
+++ b/net/pload/patches/patch-ad
@@ -0,0 +1,22 @@
+$NetBSD: patch-ad,v 1.1 2009/01/04 20:03:21 shattered Exp $
+
+--- pload.h.orig 2000-02-01 07:11:24.000000000 +0000
++++ pload.h
+@@ -35,10 +35,17 @@ struct if_dat
+ #ifdef LINUXPROC
+ FILE *file; /* /proc/net/dev */
+ #endif
++#ifdef __NetBSD__
++ u_quad_t in_bytes; /* total bytes in */
++ u_quad_t in_bytes_old; /* last total bytes in */
++ u_quad_t out_bytes; /* total bytes out */
++ u_quad_t out_bytes_old; /* last total byts out */
++#else
+ unsigned long in_bytes; /* total bytes in */
+ unsigned long in_bytes_old; /* last total bytes in */
+ unsigned long out_bytes; /* total bytes out */
+ unsigned long out_bytes_old; /* last total byts out */
++#endif
+ struct timeval prev_time; /* last time */
+ struct timeval curr_time; /* time now */
+ int history_size; /* # pts to average over*/
diff --git a/net/pload/patches/patch-ae b/net/pload/patches/patch-ae
new file mode 100644
index 00000000000..3e143efc7b2
--- /dev/null
+++ b/net/pload/patches/patch-ae
@@ -0,0 +1,28 @@
+$NetBSD: patch-ae,v 1.1 2009/01/04 20:03:21 shattered Exp $
+
+--- pload.c.orig 2000-02-01 07:11:24.000000000 +0000
++++ pload.c
+@@ -40,7 +40,11 @@ static void HandleExit(void);
+ static void CheckForWMExit(Widget, XtPointer, XEvent*, Boolean*);
+ static void CheckForIconState(Widget, XtPointer, XEvent*, Boolean*);
+ static void update(XtPointer, XtIntervalId*);
++#ifdef __NetBSD__
++static void make_label(char*,u_quad_t,double,double);
++#else
+ static void make_label(char*,unsigned long,double,double);
++#endif
+ static void do_rate(char*,double);
+ static void do_total(char*, double);
+
+@@ -621,7 +625,11 @@ void do_rate(char *b, double rate)
+ }
+
+ /* stores label in global 'buff' */
++#ifdef __NetBSD__
++void make_label(char *fmt, u_quad_t total, double rate, double max)
++#else
+ void make_label(char *fmt, unsigned long total, double rate, double max)
++#endif
+ {
+ char *p;
+ int i;