projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clang-format a few files to make CI happy
[collectd.git]
/
src
/
uptime.c
diff --git
a/src/uptime.c
b/src/uptime.c
index
31a2c1e
..
0892bda
100644
(file)
--- a/
src/uptime.c
+++ b/
src/uptime.c
@@
-21,8
+21,8
@@
#include "collectd.h"
#include "collectd.h"
-#include "common.h"
#include "plugin.h"
#include "plugin.h"
+#include "utils/common/common.h"
#if KERNEL_LINUX
#include <sys/sysinfo.h>
#if KERNEL_LINUX
#include <sys/sysinfo.h>
@@
-53,6
+53,10
@@
* Global variables
*/
* Global variables
*/
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
#if HAVE_LIBKSTAT
extern kstat_ctl_t *kc;
#endif /* #endif HAVE_LIBKSTAT */
#if HAVE_LIBKSTAT
extern kstat_ctl_t *kc;
#endif /* #endif HAVE_LIBKSTAT */
@@
-92,7
+96,7
@@
static time_t uptime_get_sys(void) { /* {{{ */
}
result = (time_t)info.uptime;
}
result = (time_t)info.uptime;
-/* #endif KERNEL_LINUX */
+
/* #endif KERNEL_LINUX */
#elif HAVE_LIBKSTAT
kstat_t *ksp;
#elif HAVE_LIBKSTAT
kstat_t *ksp;
@@
-132,7
+136,7
@@
static time_t uptime_get_sys(void) { /* {{{ */
}
result = time(NULL) - (time_t)knp->value.ui32;
}
result = time(NULL) - (time_t)knp->value.ui32;
-/* #endif HAVE_LIBKSTAT */
+
/* #endif HAVE_LIBKSTAT */
#elif HAVE_SYS_SYSCTL_H
struct timeval boottv = {0};
#elif HAVE_SYS_SYSCTL_H
struct timeval boottv = {0};
@@
-157,7
+161,7
@@
static time_t uptime_get_sys(void) { /* {{{ */
}
result = time(NULL) - boottv.tv_sec;
}
result = time(NULL) - boottv.tv_sec;
-/* #endif HAVE_SYS_SYSCTL_H */
+
/* #endif HAVE_SYS_SYSCTL_H */
#elif HAVE_PERFSTAT
int status;
#elif HAVE_PERFSTAT
int status;