diff options
author | shattered <shattered@pkgsrc.org> | 2009-01-04 20:03:21 +0000 |
---|---|---|
committer | shattered <shattered@pkgsrc.org> | 2009-01-04 20:03:21 +0000 |
commit | efb3c73f6ad7f908a798e4815da79577375316a5 (patch) | |
tree | 08cceb025dbc642197ee22bf9c69b0a567ecc47f /net/pload/patches/patch-ae | |
parent | f0b68f9cda5fccc340f8930cb9da686694d4ca03 (diff) | |
download | pkgsrc-efb3c73f6ad7f908a798e4815da79577375316a5.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/patches/patch-ae')
-rw-r--r-- | net/pload/patches/patch-ae | 28 |
1 files changed, 28 insertions, 0 deletions
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; |