diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile index 20a90d8450f8..f294f6c1e795 100644 --- a/tools/bpf/bpftool/Makefile +++ b/tools/bpf/bpftool/Makefile @@ -120,7 +120,10 @@ $(OUTPUT)_bpftool: $(_OBJS) $(LIBBPF) $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(_OBJS) $(LIBS) skeleton/profiler.bpf.o: skeleton/profiler.bpf.c - $(QUIET_CLANG)$(CLANG) -I$(srctree)/tools/lib -g -O2 -target bpf -c $< -o $@ + $(QUIET_CLANG)$(CLANG) \ + -I$(srctree)/tools/include/uapi/ \ + -I$(srctree)/tools/testing/selftests/bpf/include/uapi \ + -I$(srctree)/tools/lib -g -O2 -target bpf -c $< -o $@ profiler.skel.h: $(OUTPUT)_bpftool skeleton/profiler.bpf.o $(QUIET_GEN)$(OUTPUT)./_bpftool gen skeleton skeleton/profiler.bpf.o > $@ diff --git a/tools/bpf/bpftool/skeleton/profiler.h b/tools/bpf/bpftool/skeleton/profiler.h index e03b53eae767..1f767e9510f7 100644 --- a/tools/bpf/bpftool/skeleton/profiler.h +++ b/tools/bpf/bpftool/skeleton/profiler.h @@ -32,16 +32,15 @@ enum { #else #define __bitwise__ #endif -#define __bitwise __bitwise__ -typedef __u16 __bitwise __le16; -typedef __u16 __bitwise __be16; -typedef __u32 __bitwise __le32; -typedef __u32 __bitwise __be32; -typedef __u64 __bitwise __le64; -typedef __u64 __bitwise __be64; +typedef __u16 __bitwise__ __le16; +typedef __u16 __bitwise__ __be16; +typedef __u32 __bitwise__ __le32; +typedef __u32 __bitwise__ __be32; +typedef __u64 __bitwise__ __le64; +typedef __u64 __bitwise__ __be64; -typedef __u16 __bitwise __sum16; -typedef __u32 __bitwise __wsum; +typedef __u16 __bitwise__ __sum16; +typedef __u32 __bitwise__ __wsum; #endif /* __PROFILER_H */