summaryrefslogtreecommitdiff
path: root/sys-process/tiptop/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-16 09:35:57 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-16 09:35:57 +0000
commitb982051e7c8e12c3810a0d21d30d687b406b3ae5 (patch)
tree1f40c63a302b92f633c075f289851ab62633babe /sys-process/tiptop/files
parentb62381b18b4bf2e919cbfbae11ebcad391e38e77 (diff)
gentoo auto-resync : 16:12:2022 - 09:35:57
Diffstat (limited to 'sys-process/tiptop/files')
-rw-r--r--sys-process/tiptop/files/tiptop-2.3.1-advise-user-to-run-as-root-when-paranoid_level-3.patch46
-rw-r--r--sys-process/tiptop/files/tiptop-2.3.1-implicit-function-declaration.patch35
2 files changed, 81 insertions, 0 deletions
diff --git a/sys-process/tiptop/files/tiptop-2.3.1-advise-user-to-run-as-root-when-paranoid_level-3.patch b/sys-process/tiptop/files/tiptop-2.3.1-advise-user-to-run-as-root-when-paranoid_level-3.patch
new file mode 100644
index 000000000000..4607f4f8bbe5
--- /dev/null
+++ b/sys-process/tiptop/files/tiptop-2.3.1-advise-user-to-run-as-root-when-paranoid_level-3.patch
@@ -0,0 +1,46 @@
+Subject: [PATCH] advice user to run as root when paranoid_level==3
+
+Corresponds with Debian patch 0003_Report_root_needed
+https://sources.debian.org/patches/tiptop/2.3.1-4/0003-Report_root_needed.patch/
+
+Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
+--- a/src/requisite.c
++++ b/src/requisite.c
+@@ -17,13 +17,34 @@
+ #include "pmc.h"
+ #include "requisite.h"
+
++#define PARANOID1 "/proc/sys/kernel/perf_counter_paranoid"
++#define PARANOID2 "/proc/sys/kernel/perf_event_paranoid"
+
+ void check()
+ {
+ int fd, cpu, grp, flags, pid;
++ FILE* paranoid;
++ int paranoia_level = 999;
+ struct utsname os;
+ struct STRUCT_NAME events = {0, };
++ int n;
+
++ paranoid = fopen(PARANOID1, "r");
++ if (!paranoid)
++ paranoid = fopen(PARANOID2, "r");
++
++ if (!paranoid) {
++ fprintf(stderr, "System does not support performance events.\n");
++ fprintf(stderr, "File '/proc/sys/kernel/perf_*_paranoid' is missing.\n");
++ exit(EXIT_FAILURE);
++ }
++ n = fscanf(paranoid, "%d", &paranoia_level);
++ if (n != 1) {
++ fprintf(stderr, "Could not read '/proc/sys/kernel/perf_*_paranoid'.\n");
++ fprintf(stderr, "Trying to proceed anyway...\n");
++ }
++
++ fclose(paranoid);
+ events.disabled = 0;
+ events.exclude_hv = 1;
+ events.exclude_kernel = 1;
+--
+2.38.1
+
diff --git a/sys-process/tiptop/files/tiptop-2.3.1-implicit-function-declaration.patch b/sys-process/tiptop/files/tiptop-2.3.1-implicit-function-declaration.patch
new file mode 100644
index 000000000000..b6e3abdd727b
--- /dev/null
+++ b/sys-process/tiptop/files/tiptop-2.3.1-implicit-function-declaration.patch
@@ -0,0 +1,35 @@
+Date: Sun, 11 Dec 2022 22:11:42 +0100
+Subject: [PATCH] Fix build for sys-devel/reflex
+
+When LEX=reflex is used, this compiling calc.lex fails with a
+implicit function declaration error when
+Werror=implicit-function-declaration. (Like with clang16)
+
+Bug: https://bugs.gentoo.org/884361
+PR to upstream this: https://github.com/FeCastle/tiptop/pull/9
+
+Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
+
+Clang16 will not allow implicit function declarations by default
+--- a/src/calc.lex
++++ b/src/calc.lex
+@@ -11,6 +11,7 @@
+ %{
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+
+ #include "formula-parser.h"
+ #include "y.tab.h"
+--- a/src/process.h
++++ b/src/process.h
+@@ -95,4 +95,6 @@ void reset_values(const struct process_list* const);
+
+ void update_name_cmdline(int pid, int name_only);
+
++void handle_error(int retval);
++
+ #endif /* _PROCESS_H */
+--
+2.38.1
+