ports/sysutils/tmux-mem-cpu-load/patches/patch-common_cpu_h

23 lines
529 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Fix CP_STATES definition
Index: common/cpu.h
--- common/cpu.h.orig
+++ common/cpu.h
@@ -28,12 +28,15 @@
#define CP_IDLE 2
#define CP_NICE 3
#define CP_STATES 4
+#elif defined(__OpenBSD__)
+ #include <sys/sched.h>
+ #define CP_STATES CPUSTATES
#else
#define CP_USER 0
#define CP_NICE 1
#define CP_SYS 2
- #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #if defined(__FreeBSD__) || defined(__NetBSD__)
// *BSD or OSX
#define CP_INTR 3
#define CP_IDLE 4