- Unbreak port
PR: ports/146631 Submitted by: Martin Kraft <a0516@marimga.de>
This commit is contained in:
parent
0290019df2
commit
aaf116f1f9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=260811
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
PORTNAME= pppload
|
PORTNAME= pppload
|
||||||
PORTVERSION= 1.0
|
PORTVERSION= 1.0
|
||||||
PORTREVISION= 6
|
PORTREVISION= 7
|
||||||
CATEGORIES= net sysutils
|
CATEGORIES= net sysutils
|
||||||
MASTER_SITES= ${MASTER_SITE_SUNSITE}
|
MASTER_SITES= ${MASTER_SITE_SUNSITE}
|
||||||
MASTER_SITE_SUBDIR= system/network/serial/ppp
|
MASTER_SITE_SUBDIR= system/network/serial/ppp
|
||||||
@ -28,8 +28,4 @@ do-install:
|
|||||||
|
|
||||||
.include <bsd.port.pre.mk>
|
.include <bsd.port.pre.mk>
|
||||||
|
|
||||||
.if ${OSVERSION} >= 800064
|
|
||||||
BROKEN= does not build
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.include <bsd.port.post.mk>
|
.include <bsd.port.post.mk>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- PPPStats.C.orig Fri Jan 24 17:33:43 2003
|
--- PPPStats.C.orig 1996-09-12 04:50:13.000000000 +0200
|
||||||
+++ PPPStats.C Fri Jan 24 17:33:27 2003
|
+++ PPPStats.C 2010-05-16 12:45:39.000000000 +0200
|
||||||
@@ -19,16 +19,22 @@
|
@@ -19,16 +19,24 @@
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -14,26 +14,30 @@
|
|||||||
-#include <linux/ppp_defs.h>
|
-#include <linux/ppp_defs.h>
|
||||||
+#include <sys/time.h>
|
+#include <sys/time.h>
|
||||||
+#include <net/if.h>
|
+#include <net/if.h>
|
||||||
+#include <net/if_ppp.h>
|
+// 2010-05-16 Kf Replaced patched net/if_ppp.h by net/ppp_defs.h.
|
||||||
|
+// (Is linux/ppp_defs.h in the distribution.);
|
||||||
|
+#include <net/ppp_defs.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "PPPStats.H"
|
#include "PPPStats.H"
|
||||||
#include "Options.H"
|
#include "Options.H"
|
||||||
+#include <iostream.h>
|
+#include <iostream>
|
||||||
+
|
+
|
||||||
+void get_command(char *);
|
+void get_command(char *);
|
||||||
+char command[200];
|
+char command[200];
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -53,38 +59,44 @@
|
@@ -53,38 +61,46 @@
|
||||||
system( (const char*)options->cmd() );
|
system( (const char*)options->cmd() );
|
||||||
}
|
}
|
||||||
|
|
||||||
- DclPPPInfo PPPInfo[1];
|
- DclPPPInfo PPPInfo[1];
|
||||||
- struct ifreq ifreq;
|
- struct ifreq ifreq;
|
||||||
+ DclPPPInfo PPPInfo[1];
|
+ DclPPPInfo PPPInfo[1];
|
||||||
+ struct ifpppstatsreq ifreq;
|
+// 2010-05-16 Kf Replaced patched struct ifpppstatsreq by the original
|
||||||
|
+// struct ifreq.
|
||||||
|
+ struct ifreq ifreq;
|
||||||
struct ppp_stats* PPPStat;
|
struct ppp_stats* PPPStat;
|
||||||
- struct ppp_stats LastPPPStat[1];
|
- struct ppp_stats LastPPPStat[1];
|
||||||
-
|
-
|
||||||
@ -96,7 +100,7 @@
|
|||||||
unsigned int rxDelta = PPPStat->p.ppp_ibytes - _rxTotal;
|
unsigned int rxDelta = PPPStat->p.ppp_ibytes - _rxTotal;
|
||||||
unsigned int txDelta = PPPStat->p.ppp_obytes - _txTotal;
|
unsigned int txDelta = PPPStat->p.ppp_obytes - _txTotal;
|
||||||
_rxTotal = PPPStat->p.ppp_ibytes;
|
_rxTotal = PPPStat->p.ppp_ibytes;
|
||||||
@@ -92,4 +104,17 @@
|
@@ -92,4 +108,17 @@
|
||||||
if ( rxDelta == _rxTotal ) rxDelta = 0;
|
if ( rxDelta == _rxTotal ) rxDelta = 0;
|
||||||
if ( txDelta == _txTotal ) txDelta = 0;
|
if ( txDelta == _txTotal ) txDelta = 0;
|
||||||
emit changeStats( rxDelta, txDelta, _rxTotal, _txTotal );
|
emit changeStats( rxDelta, txDelta, _rxTotal, _txTotal );
|
||||||
|
Loading…
Reference in New Issue
Block a user