[openwrt/openwrt] bpftools: fix compilation with musl 1.2.x

LEDE Commits lede-commits at lists.infradead.org
Wed Sep 22 12:35:31 PDT 2021


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f84b5132660b2e3f2536ca777e59e3ce3dab13ab

commit f84b5132660b2e3f2536ca777e59e3ce3dab13ab
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Tue Nov 24 17:32:34 2020 -0800

    bpftools: fix compilation with musl 1.2.x
    
    A definition for __maybe_inline is needed.
    
    Refreshed patches.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 .../utils/bpftools/patches/006-musl-120.patch        | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

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
index 0000000000..53be466f0b
--- /dev/null
+++ b/package/network/utils/bpftools/patches/006-musl-120.patch
@@ -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>



More information about the lede-commits mailing list