Leonid Plyushch
7 years ago
committed by
Fredrik Fornwall
3 changed files with 42 additions and 18 deletions
@ -0,0 +1,36 @@ |
|||||
|
diff -uNr htop-2.1.0/linux/LinuxProcessList.c htop-2.1.0.mod/linux/LinuxProcessList.c
|
||||
|
--- htop-2.1.0/linux/LinuxProcessList.c 2018-02-04 20:57:13.000000000 +0200
|
||||
|
+++ htop-2.1.0.mod/linux/LinuxProcessList.c 2018-03-05 17:57:46.901891199 +0200
|
||||
|
@@ -37,6 +37,14 @@
|
||||
|
#include <linux/taskstats.h> |
||||
|
#endif |
||||
|
|
||||
|
+#ifndef major
|
||||
|
+#define major(rdev) ((rdev)>>8)
|
||||
|
+#endif
|
||||
|
+
|
||||
|
+#ifndef minor
|
||||
|
+#define minor(rdev) ((rdev) & 0xff)
|
||||
|
+#endif
|
||||
|
+
|
||||
|
/*{ |
||||
|
|
||||
|
#include "ProcessList.h" |
||||
|
diff -uNr htop-2.1.0/Process.c htop-2.1.0.mod/Process.c
|
||||
|
--- htop-2.1.0/Process.c 2018-02-04 20:57:13.000000000 +0200
|
||||
|
+++ htop-2.1.0.mod/Process.c 2018-03-05 17:59:16.522983619 +0200
|
||||
|
@@ -29,6 +29,14 @@
|
||||
|
#include <assert.h> |
||||
|
#include <math.h> |
||||
|
|
||||
|
+#ifndef major
|
||||
|
+#define major(rdev) ((rdev)>>8)
|
||||
|
+#endif
|
||||
|
+
|
||||
|
+#ifndef minor
|
||||
|
+#define minor(rdev) ((rdev) & 0xff)
|
||||
|
+#endif
|
||||
|
+
|
||||
|
#ifdef __ANDROID__ |
||||
|
#define SYS_ioprio_get __NR_ioprio_get |
||||
|
#define SYS_ioprio_set __NR_ioprio_set |
@ -1,14 +0,0 @@ |
|||||
diff -uNr htop-2.0.2/StringUtils.c htop-2.0.2.mod/StringUtils.c
|
|
||||
--- htop-2.0.2/StringUtils.c 2016-06-20 18:11:13.000000000 +0300
|
|
||||
+++ htop-2.0.2.mod/StringUtils.c 2017-09-26 13:33:10.596064441 +0300
|
|
||||
@@ -88,6 +88,10 @@
|
|
||||
} |
|
||||
|
|
||||
void String_freeArray(char** s) { |
|
||||
+ if (!s) {
|
|
||||
+ return;
|
|
||||
+ }
|
|
||||
+
|
|
||||
for (int i = 0; s[i] != NULL; i++) { |
|
||||
free(s[i]); |
|
||||
} |
|
Loading…
Reference in new issue