bpftools: fix compilation with musl 1.2.x
authorRosen Penev <rosenp@gmail.com>
Wed, 25 Nov 2020 01:32:34 +0000 (17:32 -0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 22 Sep 2021 17:04:02 +0000 (19:04 +0200)
A definition for __maybe_inline is needed.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
package/network/utils/bpftools/patches/006-musl-120.patch [new file with mode: 0644]

diff --git a/package/network/utils/bpftools/patches/006-musl-120.patch b/package/network/utils/bpftools/patches/006-musl-120.patch
new file mode 100644 (file)
index 0000000..53be466
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/tools/bpf/bpftool/btf_dumper.c
++++ b/tools/bpf/bpftool/btf_dumper.c
+@@ -5,6 +5,7 @@
+ #include <stdio.h> /* for (FILE *) used by json_writer */
+ #include <string.h>
+ #include <unistd.h>
++#include <linux/compiler.h>
+ #include <asm/byteorder.h>
+ #include <linux/bitops.h>
+ #include <linux/btf.h>
+--- a/tools/bpf/bpftool/map_perf_ring.c
++++ b/tools/bpf/bpftool/map_perf_ring.c
+@@ -16,6 +16,7 @@
+ #include <time.h>
+ #include <unistd.h>
+ #include <linux/bpf.h>
++#include <linux/compiler.h>
+ #include <linux/perf_event.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>