aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJules Maselbas <jmaselbas@zdiv.net>2024-05-15 12:28:07 +0200
committerMilan P. Stanić <mps@arvanta.net>2024-05-15 11:25:10 +0000
commitfd71f3d981188e054894548e6a4ba565b2c8574d (patch)
treee4b5b8657217954b598ce7693bb6de7f772263ca
parent5b6f8b7608e8d5b387ec21ab1cdf396a85e4e40d (diff)
community/linux-tools: fix implicit basename declaration
-rw-r--r--community/linux-tools/APKBUILD4
-rw-r--r--community/linux-tools/bpftool-basename.patch14
-rw-r--r--community/linux-tools/perf-basename.patch10
3 files changed, 28 insertions, 0 deletions
diff --git a/community/linux-tools/APKBUILD b/community/linux-tools/APKBUILD
index 09a0f07848f..26773a9ecec 100644
--- a/community/linux-tools/APKBUILD
+++ b/community/linux-tools/APKBUILD
@@ -70,6 +70,8 @@ source="https://kernel.org/pub/linux/kernel/v6.x/linux-$_kernver.tar.xz
cpupower-libs.patch
dt_lnk.patch
perf-doc.patch
+ perf-basename.patch
+ bpftool-basename.patch
cpupower.initd
cpupower.confd
usbip.initd
@@ -287,6 +289,8 @@ sha512sums="
a46e3a84b00a39a356618831d0ddfb7f0d10f0a3799d1307ba2cc832e73c01f8d637a4e801a6dd25025f6f13155c6ad8b836422ff72d365e51063ac0bf907f52 cpupower-libs.patch
0657b461659e79c1926379aab30e7b7ab2d59eaf3e686f1dce468b79eb1320c188c14a0507361660abd2553bccffa9e149fa5b6e4d770d10c99bf5dafd2e05ee dt_lnk.patch
2092b96d64e6c379ae52700b3c1bf459581afea69622a296821381e74ecafa4a08cea24eab002ad2152878a4508918de7807ac98ba72faf2d4dea18cc275933f perf-doc.patch
+518a843bc4f11275e746a3fbcdbf126111f4f86f7f757033fa1b0e19ec1f8965bbfbcd9f170f9d33ab562b3e09743c080adc7fb8657f263ddcf120cf76b4da44 perf-basename.patch
+ea04b71c828df423e55ce22058015fe3cf13f58a1adbddefa61a8df26b343d22596d16737c592ead87a82df68672d44cbe4d4bfa4561185347db5c80ee9db340 bpftool-basename.patch
97ecfeaaaa8efca7af585316b843bf7be885e88095bbdfbf52bc9a96b14dc862435482781e205ea022ab208978aaa4aabb317354fab890ed514a5088ae5045c8 cpupower.initd
63cd12a4d8782198c71662e9205e346e064b65bae5e3e175b5bc43bdf7ec6ddf675b60349750afe3c37c8a925f9ae9a93530671821342581bd282a69e0773b8c cpupower.confd
fcbd64d844c9bc187d08cef5995e91a46c0df78deb24e96ac9210c0e2c730eca0301970d9b8ffbf003df274682d05072431a26b59d8c491f396618268a12ec92 usbip.initd
diff --git a/community/linux-tools/bpftool-basename.patch b/community/linux-tools/bpftool-basename.patch
new file mode 100644
index 00000000000..ef1451f789f
--- /dev/null
+++ b/community/linux-tools/bpftool-basename.patch
@@ -0,0 +1,14 @@
+This should be fixed and the patch dropped in Linux 6.9, see:
+https://lore.kernel.org/bpf/Zbe3NuOgaupvUcpF@kernel.org/
+--
+--- a/tools/bpf/bpftool/gen.c
++++ b/tools/bpf/bpftool/gen.c
+@@ -23,6 +23,8 @@
+ #include "json_writer.h"
+ #include "main.h"
+
++#define basename(path) (strrchr((path),'/') ? strrchr((path),'/')+1 : (path))
++
+ #define MAX_OBJ_NAME_LEN 64
+
+ static void sanitize_identifier(char *name)
diff --git a/community/linux-tools/perf-basename.patch b/community/linux-tools/perf-basename.patch
new file mode 100644
index 00000000000..f688e2f430a
--- /dev/null
+++ b/community/linux-tools/perf-basename.patch
@@ -0,0 +1,10 @@
+--- a/tools/perf/util/probe-event.c
++++ b/tools/perf/util/probe-event.c
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <stdarg.h>
+ #include <limits.h>
++#include <libgen.h> /* for basename */
+ #include <elf.h>
+
+ #include "build-id.h"