X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fcollectd.c;h=140e7ccece37db4e5a04b9b2e4decabb1ee2aa30;hb=2700666217249cd4794dfc17b4ac3b28f3dca56b;hp=9ec09347267f474c846d4807ceb065f9800ce493;hpb=c9fc2c6ad39d61ba830611123e03d690536688b8;p=collectd.git diff --git a/src/daemon/collectd.c b/src/daemon/collectd.c index 9ec09347..140e7cce 100644 --- a/src/daemon/collectd.c +++ b/src/daemon/collectd.c @@ -43,6 +43,10 @@ #include #endif +#if HAVE_KSTAT_H +#include +#endif + #ifndef COLLECTD_LOCALE #define COLLECTD_LOCALE "C" #endif @@ -208,6 +212,7 @@ static int change_basedir(const char *orig_dir, _Bool create) { } /* static int change_basedir (char *dir) */ #if HAVE_LIBKSTAT +extern kstat_ctl_t *kc; static void update_kstat(void) { if (kc == NULL) { if ((kc = kstat_open()) == NULL) @@ -461,7 +466,7 @@ void read_cmdline(int argc, char **argv, struct cmdline_config *config) { /* read options */ while (1) { int c; - c = getopt(argc, argv, "htTC:" + c = getopt(argc, argv, "BhtTC:" #if COLLECT_DAEMON "fP:" #endif