ports/sysutils/collectd/patches/patch-src_cpu_c

18 lines
409 B
Text

Unless sched.h is included, collectd's cpu module falls back to using local
definitions of CPUSTATES and related macros which no longer match ones used
by the kernel.
Index: src/cpu.c
--- src/cpu.c.orig
+++ src/cpu.c
@@ -63,6 +63,10 @@
#include <sys/sysctl.h>
#endif
+#ifdef HAVE_SYS_SCHED_H
+#include <sys/sched.h>
+#endif
+
#ifdef HAVE_SYS_DKSTAT_H
/* implies BSD variant */
#include <sys/dkstat.h>