X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Finterface.c;h=3a3e9f6ed386facda5390c5132c417a00ccf5d69;hb=7111bb6df7628edce3a8e538b386fbe27633a191;hp=2ff7db2a1690dd3ffa1da8ac41a99cd474430c8e;hpb=be126043c2be20399d7670fe194645292018bde0;p=collectd.git diff --git a/src/interface.c b/src/interface.c index 2ff7db2a..3a3e9f6e 100644 --- a/src/interface.c +++ b/src/interface.c @@ -91,6 +91,9 @@ static ignorelist_t *ignorelist = NULL; static _Bool report_inactive = 1; #ifdef HAVE_LIBKSTAT +#if HAVE_KSTAT_H +#include +#endif #define MAX_NUMIF 256 extern kstat_ctl_t *kc; static kstat_t *ksp[MAX_NUMIF]; @@ -297,7 +300,7 @@ static int interface_read(void) { if (unique_name) snprintf(iname, sizeof(iname), "%s_%d_%s", ksp[i]->ks_module, - ksp[i]->ks_instance, ksp[i]->ks_name); + ksp[i]->ks_instance, ksp[i]->ks_name); else sstrncpy(iname, ksp[i]->ks_name, sizeof(iname));