diff options
author | Slávek Banko <[email protected]> | 2015-06-26 13:12:00 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2015-06-26 13:27:31 +0200 |
commit | 1aeb94bdae94e8b164eace8125a61443b01c3784 (patch) | |
tree | 67261ded7ea642fb1d91b70e42b663132c5f8b2a | |
parent | 8068c89c7fe09274ffb8ae601dccf594423e00a4 (diff) | |
download | tdenetwork-1aeb94bdae94e8b164eace8125a61443b01c3784.tar.gz tdenetwork-1aeb94bdae94e8b164eace8125a61443b01c3784.zip |
Fix freebsd support in kppp
Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r-- | kppp/pppstats.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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 <netinet/in.h> #ifdef __DragonFly__ #include <net/ppp_layer/ppp_defs.h> +#elif defined(__FreeBSD__) +#include <net/if.h> +#include <net/ppp_defs.h> #else #include <net/ppp_defs.h> #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 */ |