Fix freebsd support in kppp

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 10 years ago
parent 8068c89c7f
commit 1aeb94bdae

@ -56,6 +56,9 @@
#include <netinet/in.h> #include <netinet/in.h>
#ifdef __DragonFly__ #ifdef __DragonFly__
#include <net/ppp_layer/ppp_defs.h> #include <net/ppp_layer/ppp_defs.h>
#elif defined(__FreeBSD__)
#include <net/if.h>
#include <net/ppp_defs.h>
#else #else
#include <net/ppp_defs.h> #include <net/ppp_defs.h>
#endif #endif
@ -261,6 +264,7 @@ bool PPPStats::doStats() {
return false; return false;
} }
# if !defined(__FreeBSD__)
// "in" "pack" "comp" "uncomp" "err" // "in" "pack" "comp" "uncomp" "err"
// IN PACK VJCOMP VJUNC VJERR // IN PACK VJCOMP VJUNC VJERR
@ -284,12 +288,13 @@ bool PPPStats::doStats() {
packetsoutunc = cur.p.ppp_opackets - cur.vj.vjs_packets; packetsoutunc = cur.p.ppp_opackets - cur.vj.vjs_packets;
return true; return true;
# endif
} }
#ifndef STREAMS #ifndef STREAMS
bool PPPStats::get_ppp_stats(struct ppp_stats *curp){ bool PPPStats::get_ppp_stats(struct ppp_stats *curp){
# if !defined(__FreeBSD__)
struct ifpppstatsreq req; struct ifpppstatsreq req;
if(s==0) if(s==0)
@ -310,6 +315,9 @@ bool PPPStats::get_ppp_stats(struct ppp_stats *curp){
} }
*curp = req.stats; *curp = req.stats;
return true; return true;
# else
return false;
# endif
} }
#else /* STREAMS */ #else /* STREAMS */

Loading…
Cancel
Save