From: campbellsean@google.com Date: Fri, 6 Oct 2017 18:23:18 +0000 (-0400) Subject: Fix kstat_ctl_t definition in globals. X-Git-Tag: collectd-5.8.0~35^2~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7381780b0bec2dd004324aebcb50262f12a2b44d;p=collectd.git Fix kstat_ctl_t definition in globals. --- diff --git a/src/daemon/globals.c b/src/daemon/globals.c index b720cd88..652ff06d 100644 --- a/src/daemon/globals.c +++ b/src/daemon/globals.c @@ -24,6 +24,10 @@ #include "common.h" #include "globals.h" +#if HAVE_KSTAT_H +#include +#endif + void hostname_set(char const *hostname) { sstrncpy(hostname_g, hostname, sizeof(hostname_g)); } @@ -34,5 +38,7 @@ void hostname_set(char const *hostname) { char *hostname_g; cdtime_t interval_g; int timeout_g; +#if HAVE_KSTAT_H kstat_ctl_t *kc; +#endif diff --git a/src/daemon/globals.h b/src/daemon/globals.h index b4eb5f6f..b91ccc82 100644 --- a/src/daemon/globals.h +++ b/src/daemon/globals.h @@ -26,10 +26,6 @@ #include -#if HAVE_KSTAT_H -#include -#endif - #ifndef DATA_MAX_NAME_LEN #define DATA_MAX_NAME_LEN 128 #endif