- update to tmux-mem-cpu-load-3.5.1
- unbreak runtime due to CP_STATES mismatch
This commit is contained in:
parent
88e0a713ee
commit
ec51c34df0
@ -1,11 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.23 2020/02/24 07:26:59 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.24 2021/08/29 08:55:15 jasper Exp $
|
||||
|
||||
COMMENT = CPU, RAM memory, and load monitor for use with tmux(1)
|
||||
|
||||
GH_ACCOUNT = thewtex
|
||||
GH_PROJECT = tmux-mem-cpu-load
|
||||
GH_TAGNAME = v3.4.0
|
||||
REVISION = 5
|
||||
GH_TAGNAME = v3.5.1
|
||||
|
||||
CATEGORIES = sysutils
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (tmux-mem-cpu-load-3.4.0.tar.gz) = p3OZThYIEqlkq8f8To7Ba32YM+2wpm5cZ/KHx8WUnss=
|
||||
SIZE (tmux-mem-cpu-load-3.4.0.tar.gz) = 19483
|
||||
SHA256 (tmux-mem-cpu-load-3.5.1.tar.gz) = a2IZe6dV7sd1s/SU22F7I5tenXmUXhZaPIu6O5CS0NE=
|
||||
SIZE (tmux-mem-cpu-load-3.5.1.tar.gz) = 23020
|
||||
|
19
sysutils/tmux-mem-cpu-load/patches/patch-common_cpu_h
Normal file
19
sysutils/tmux-mem-cpu-load/patches/patch-common_cpu_h
Normal file
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-common_cpu_h,v 1.1 2021/08/29 08:55:15 jasper Exp $
|
||||
|
||||
Fix CP_STATES definition
|
||||
|
||||
Index: common/cpu.h
|
||||
--- common/cpu.h.orig
|
||||
+++ common/cpu.h
|
||||
@@ -36,7 +36,11 @@
|
||||
// *BSD or OSX
|
||||
#define CP_INTR 3
|
||||
#define CP_IDLE 4
|
||||
+ #if defined(__OpenBSD__)
|
||||
+ #define CP_STATES 6
|
||||
+ #else
|
||||
#define CP_STATES 5
|
||||
+ #endif
|
||||
#else
|
||||
//linux
|
||||
#define CP_IDLE 3
|
@ -1,16 +1,16 @@
|
||||
$OpenBSD: patch-openbsd_cpu_cc,v 1.1 2020/02/24 07:26:59 jasper Exp $
|
||||
$OpenBSD: patch-openbsd_cpu_cc,v 1.2 2021/08/29 08:55:15 jasper Exp $
|
||||
|
||||
https://github.com/thewtex/tmux-mem-cpu-load/commit/2107ea84f10bd5aa260dd84365bb85b7eab1dfdf
|
||||
Fix return type of get_cpu_count().
|
||||
|
||||
Index: openbsd/cpu.cc
|
||||
--- openbsd/cpu.cc.orig
|
||||
+++ openbsd/cpu.cc
|
||||
@@ -27,7 +27,7 @@
|
||||
uint8_t get_cpu_count()
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "error.h"
|
||||
#include "cpu.h"
|
||||
|
||||
-uint8_t get_cpu_count()
|
||||
+uint32_t get_cpu_count()
|
||||
{
|
||||
int cpu_count = 1; // default to 1
|
||||
- int mib[2] = { CTL_HW, HW_NCPU };
|
||||
+ int mib[2] = { CTL_HW, HW_NCPUONLINE };
|
||||
size_t len = sizeof( cpu_count );
|
||||
|
||||
if( sysctl( mib, 2, &cpu_count, &len, NULL, 0 ) < 0 )
|
||||
int mib[2] = { CTL_HW, HW_NCPUONLINE };
|
||||
|
Loading…
x
Reference in New Issue
Block a user