From 1aeb94bdae94e8b164eace8125a61443b01c3784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 26 Jun 2015 13:12:00 +0200 Subject: [PATCH] Fix freebsd support in kppp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- kppp/pppstats.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kppp/pppstats.cpp b/kppp/pppstats.cpp index 29a87e77..eb209990 100644 --- a/kppp/pppstats.cpp +++ b/kppp/pppstats.cpp @@ -56,6 +56,9 @@ #include #ifdef __DragonFly__ #include +#elif defined(__FreeBSD__) +#include +#include #else #include #endif @@ -261,6 +264,7 @@ bool PPPStats::doStats() { return false; } +# if !defined(__FreeBSD__) // "in" "pack" "comp" "uncomp" "err" // IN PACK VJCOMP VJUNC VJERR @@ -284,12 +288,13 @@ bool PPPStats::doStats() { packetsoutunc = cur.p.ppp_opackets - cur.vj.vjs_packets; return true; +# endif } #ifndef STREAMS bool PPPStats::get_ppp_stats(struct ppp_stats *curp){ - +# if !defined(__FreeBSD__) struct ifpppstatsreq req; if(s==0) @@ -310,6 +315,9 @@ bool PPPStats::get_ppp_stats(struct ppp_stats *curp){ } *curp = req.stats; return true; +# else + return false; +# endif } #else /* STREAMS */