Merge branch 'collectd-5.7' into collectd-5.8
[collectd.git] / src / interface.c
index 78a0d69..3a3e9f6 100644 (file)
@@ -91,6 +91,9 @@ static ignorelist_t *ignorelist = NULL;
 static _Bool report_inactive = 1;
 
 #ifdef HAVE_LIBKSTAT
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
 #define MAX_NUMIF 256
 extern kstat_ctl_t *kc;
 static kstat_t *ksp[MAX_NUMIF];
@@ -296,8 +299,8 @@ static int interface_read(void) {
       continue;
 
     if (unique_name)
-      ssnprintf(iname, sizeof(iname), "%s_%d_%s", ksp[i]->ks_module,
-                ksp[i]->ks_instance, ksp[i]->ks_name);
+      snprintf(iname, sizeof(iname), "%s_%d_%s", ksp[i]->ks_module,
+               ksp[i]->ks_instance, ksp[i]->ks_name);
     else
       sstrncpy(iname, ksp[i]->ks_name, sizeof(iname));