projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.7' into collectd-5.8
[collectd.git]
/
src
/
daemon
/
collectd.c
diff --git
a/src/daemon/collectd.c
b/src/daemon/collectd.c
index
9ec0934
..
140e7cc
100644
(file)
--- a/
src/daemon/collectd.c
+++ b/
src/daemon/collectd.c
@@
-43,6
+43,10
@@
#include <statgrab.h>
#endif
#include <statgrab.h>
#endif
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
#ifndef COLLECTD_LOCALE
#define COLLECTD_LOCALE "C"
#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
} /* 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)
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;
/* read options */
while (1) {
int c;
- c = getopt(argc, argv, "htTC:"
+ c = getopt(argc, argv, "
B
htTC:"
#if COLLECT_DAEMON
"fP:"
#endif
#if COLLECT_DAEMON
"fP:"
#endif