]> arthur.barton.de Git - netdata.git/commitdiff
Fix for ifi_oqdrops field on previous FreeBSD releases and FreeNAS
authorVladimir Kobal <vlad@prokk.net>
Mon, 9 Jan 2017 18:31:38 +0000 (13:31 -0500)
committerVladimir Kobal <vlad@prokk.net>
Mon, 9 Jan 2017 18:31:38 +0000 (13:31 -0500)
src/freebsd_sysctl.c

index 202bff1252a97dd6d32c5b67876f66f8c49a5254..d590e5f3a9b3c561a75fc4ce85a567f9b80be15a 100644 (file)
@@ -15,7 +15,6 @@
 // NEEDED BY: struct sysctl_netisr_workstream, struct sysctl_netisr_work
 #include <net/netisr.h>
 // NEEDED BY: struct ifaddrs, getifaddrs()
-#define _IFI_OQDROPS // It is for FreeNAS only. Most probably in future releases of FreeNAS it will be removed
 #include <net/if.h>
 #include <ifaddrs.h>
 // NEEDED BY do_tcp...
@@ -1280,14 +1279,14 @@ int do_freebsd_sysctl(int update_every, usec_t dt) {
                     st->isdetail = 1;
 
                     rrddim_add(st, "inbound", NULL, 1, 1, RRDDIM_INCREMENTAL);
-#ifdef __IFI_OQDROPS
+#if __FreeBSD__ >= 11
                     rrddim_add(st, "outbound", NULL, -1, 1, RRDDIM_INCREMENTAL);
 #endif
                 }
                 else rrdset_next(st);
 
                 rrddim_set(st, "inbound", IFA_DATA(iqdrops));
-#ifdef __IFI_OQDROPS
+#if __FreeBSD__ >= 11
                 rrddim_set(st, "outbound", IFA_DATA(oqdrops));
 #endif
                 rrdset_done(st);