X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fuptime.c;h=0892bda3a7c8ab549a9bdc82e51c8042d7b876f7;hp=31a2c1e20d03d76105f24189fef4ec8372c6d878;hb=54619dc85fd308b21ed09a0271e5c7383c7921b9;hpb=22813e1a6a3d059efc67975893df985052661a7a diff --git a/src/uptime.c b/src/uptime.c index 31a2c1e2..0892bda3 100644 --- a/src/uptime.c +++ b/src/uptime.c @@ -21,8 +21,8 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #if KERNEL_LINUX #include @@ -53,6 +53,10 @@ * Global variables */ +#if HAVE_KSTAT_H +#include +#endif + #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; -/* #endif KERNEL_LINUX */ + /* #endif KERNEL_LINUX */ #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; -/* #endif HAVE_LIBKSTAT */ + /* #endif HAVE_LIBKSTAT */ #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; -/* #endif HAVE_SYS_SYSCTL_H */ + /* #endif HAVE_SYS_SYSCTL_H */ #elif HAVE_PERFSTAT int status;