From fd96744998cbd405320ef820d038dd3ee0c87caf Mon Sep 17 00:00:00 2001 From: "campbellsean@google.com" Date: Fri, 6 Oct 2017 13:47:45 -0400 Subject: [PATCH] Cleanup some defines and includes. --- src/daemon/collectd.h | 4 ---- src/daemon/globals.c | 8 ++++---- src/daemon/globals.h | 8 ++++++++ src/daemon/plugin.h | 4 ---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/daemon/collectd.h b/src/daemon/collectd.h index 22311950..0558aa40 100644 --- a/src/daemon/collectd.h +++ b/src/daemon/collectd.h @@ -186,10 +186,6 @@ #include #endif -#if HAVE_KSTAT_H -#include -#endif - #ifndef PACKAGE_NAME #define PACKAGE_NAME "collectd" #endif diff --git a/src/daemon/globals.c b/src/daemon/globals.c index bde7eb22..b720cd88 100644 --- a/src/daemon/globals.c +++ b/src/daemon/globals.c @@ -23,16 +23,16 @@ #include "common.h" #include "globals.h" -#include "plugin.h" void hostname_set(char const *hostname) { sstrncpy(hostname_g, hostname, sizeof(hostname_g)); } +/* + * Global variables + */ char *hostname_g; cdtime_t interval_g; -int pidfile_from_cli = 0; int timeout_g; -#if HAVE_LIBKSTAT kstat_ctl_t *kc; -#endif /* HAVE_LIBKSTAT */ + diff --git a/src/daemon/globals.h b/src/daemon/globals.h index 58700316..b4eb5f6f 100644 --- a/src/daemon/globals.h +++ b/src/daemon/globals.h @@ -26,6 +26,14 @@ #include +#if HAVE_KSTAT_H +#include +#endif + +#ifndef DATA_MAX_NAME_LEN +#define DATA_MAX_NAME_LEN 128 +#endif + /* Type for time as used by "utils_time.h" */ typedef uint64_t cdtime_t; diff --git a/src/daemon/plugin.h b/src/daemon/plugin.h index 4f877e0e..095d662f 100644 --- a/src/daemon/plugin.h +++ b/src/daemon/plugin.h @@ -36,10 +36,6 @@ #include -#ifndef DATA_MAX_NAME_LEN -#define DATA_MAX_NAME_LEN 128 -#endif - #define DS_TYPE_COUNTER 0 #define DS_TYPE_GAUGE 1 #define DS_TYPE_DERIVE 2 -- 2.30.2