Browse Source

kppp: fix to build on NetBSD

Signed-off-by: OBATA Akio <obache@wizdas.com>
master
OBATA Akio 1 month ago
parent
commit
48ca387b65
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      kppp/pppstats.cpp

+ 5
- 2
kppp/pppstats.cpp View File

@@ -56,9 +56,12 @@
56 56
 #include <netinet/in.h>
57 57
 #ifdef __DragonFly__
58 58
 #include <net/ppp_layer/ppp_defs.h>
59
-#elif defined(__FreeBSD__)
59
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
60 60
 #include <net/if.h>
61 61
 #include <net/ppp_defs.h>
62
+#ifdef __NetBSD__
63
+#include <net/if_ppp.h>
64
+#endif
62 65
 #else
63 66
 #include <net/ppp_defs.h>
64 67
 #endif
@@ -294,7 +297,7 @@ bool PPPStats::doStats() {
294 297
 
295 298
 #ifndef STREAMS
296 299
 bool PPPStats::get_ppp_stats(struct ppp_stats *curp){
297
-# if !defined(__FreeBSD__)
300
+# if !defined(__FreeBSD__) && !defined(__NetBSD__)
298 301
   struct ifpppstatsreq req;
299 302
 
300 303
     if(s==0)

Loading…
Cancel
Save