bump(main/htop): 3.3.0

This commit is contained in:
tqfx 2024-04-20 23:35:22 +08:00 committed by Twaik Yont
parent 90447290e4
commit b8956e59d0
4 changed files with 27 additions and 60 deletions

View File

@ -1,25 +1,9 @@
diff -uNr htop-3.2.0/linux/LinuxProcessList.c htop-3.2.0.mod/linux/LinuxProcessList.c
--- htop-3.2.0/linux/LinuxProcessList.c 2022-05-01 14:31:20.000000000 +0800
+++ htop-3.2.0.mod/linux/LinuxProcessList.c 2022-06-18 13:46:07.415229800 +0800
@@ -274,7 +274,14 @@
this->haveSmapsRollup = (access(PROCDIR "/self/smaps_rollup", R_OK) == 0);
diff --git a/linux/LinuxMachine.c b/linux/LinuxMachine.c
--- a/linux/LinuxMachine.c
+++ b/linux/LinuxMachine.c
@@ -404,7 +404,15 @@ static void LinuxMachine_scanCPUTime(LinuxMachine* this) {
// Read btime (the kernel boot time, as number of seconds since the epoch)
- FILE* statfile = fopen(PROCSTATFILE, "r");
+ FILE* statfile;
+
+ if (access("/proc/stat", R_OK) == 0){
+ statfile = fopen("/proc/stat", "r");
+ } else {
+ statfile = fopen(PROCSTATFILE, "r");
+ }
+
if (statfile == NULL)
CRT_fatalError("Cannot open " PROCSTATFILE);
while (true) {
@@ -1925,7 +1932,15 @@
LinuxProcessList_updateCPUcount(super);
LinuxMachine_updateCPUcount(this);
- FILE* file = fopen(PROCSTATFILE, "r");
+ FILE* file;
@ -34,3 +18,19 @@ diff -uNr htop-3.2.0/linux/LinuxProcessList.c htop-3.2.0.mod/linux/LinuxProcessL
if (!file)
CRT_fatalError("Cannot open " PROCSTATFILE);
@@ -653,7 +661,14 @@ Machine* Machine_new(UsersTable* usersTable, uid_t userId) {
CRT_fatalError("Cannot get clock ticks by sysconf(_SC_CLK_TCK)");
// Read btime (the kernel boot time, as number of seconds since the epoch)
- FILE* statfile = fopen(PROCSTATFILE, "r");
+ FILE* statfile;
+
+ if (access("/proc/stat", R_OK) == 0){
+ statfile = fopen("/proc/stat", "r");
+ } else {
+ statfile = fopen(PROCSTATFILE, "r");
+ }
+
if (statfile == NULL)
CRT_fatalError("Cannot open " PROCSTATFILE);

View File

@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://htop.dev/
TERMUX_PKG_DESCRIPTION="Interactive process viewer for Linux"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3.2.2
TERMUX_PKG_VERSION=3.3.0
TERMUX_PKG_SRCURL=https://github.com/htop-dev/htop/archive/${TERMUX_PKG_VERSION}/htop-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=3829c742a835a0426db41bb039d1b976420c21ec65e93b35cd9bfd2d57f44ac8
TERMUX_PKG_SHA256=1e5cc328eee2bd1acff89f860e3179ea24b85df3ac483433f92a29977b14b045
# htop checks setlocale() return value for UTF-8 support, so use libandroid-support.
TERMUX_PKG_DEPENDS="libandroid-support, ncurses"
TERMUX_PKG_BREAKS="htop-legacy"

View File

@ -1,33 +0,0 @@
--- ./Process.c.orig 2021-02-13 11:57:02.747930225 +0000
+++ ./Process.c 2021-02-13 11:58:40.299938503 +0000
@@ -35,6 +35,13 @@
#include <sys/sysmacros.h>
#endif
+#ifndef major
+#define major(rdev) ((rdev)>>8)
+#endif
+
+#ifndef minor
+#define minor(rdev) ((rdev) & 0xff)
+#endif
static uid_t Process_getuid = (uid_t)-1;
--- ./linux/LinuxProcessList.c.orig 2021-02-13 11:57:02.747930225 +0000
+++ ./linux/LinuxProcessList.c 2021-02-13 11:59:30.411609089 +0000
@@ -52,6 +52,14 @@
#include <sys/sysmacros.h>
#endif
+#ifndef major
+#define major(rdev) ((rdev)>>8)
+#endif
+
+#ifndef minor
+#define minor(rdev) ((rdev) & 0xff)
+#endif
+
#ifdef HAVE_SENSORS_SENSORS_H
#include "LibSensors.h"
#endif

View File

@ -1,7 +1,7 @@
diff -uNr htop-3.0.5/linux/LinuxProcessList.h htop-3.0.5.mod/linux/LinuxProcessList.h
--- htop-3.0.5/linux/LinuxProcessList.h 2021-01-11 17:18:21.000000000 +0000
+++ htop-3.0.5.mod/linux/LinuxProcessList.h 2022-04-13 05:47:15.726020765 +0000
@@ -85,7 +85,7 @@
diff --git a/linux/LinuxMachine.h b/linux/LinuxMachine.h
--- a/linux/LinuxMachine.h
+++ b/linux/LinuxMachine.h
@@ -87,7 +87,7 @@ typedef struct LinuxMachine_ {
#endif
#ifndef PROCSTATFILE