bpftools: fix compilation with musl 1.2.x

A definition for __maybe_inline is needed.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-11-24 17:32:34 -08:00 committed by Hauke Mehrtens
parent b519be1c52
commit f84b513266
1 changed files with 20 additions and 0 deletions

View File

@ -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>