pkgsrc/net/pload/patches/patch-ad
marino 5ebe87e40f net/wmpload: Add FreeBSD and DragonFly support
Patch differentials came from FreeBSD ports.
Followed NetBSD's suit with the quad support.
2012-08-11 17:20:23 +00:00

22 lines
843 B
Text

$NetBSD: patch-ad,v 1.2 2012/08/11 17:20:23 marino 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
+#if defined(__NetBSD__) || defined(__DragonFly__)
+ 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*/