libbpf-tools: add libbpf's Linux uapi headers to build
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 26 Mar 2021 06:58:19 +0000 (23:58 -0700)
committeryonghong-song <ys114321@gmail.com>
Thu, 1 Apr 2021 17:20:26 +0000 (10:20 -0700)
Do not rely on up-to-date UAPI headers on the system. Instead use the most
recent ones that are used for libbpf's own build.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
libbpf-tools/Makefile

index 7423546c34d82368768ecec90670259ed78e9180..345bb7bc65d2a6178f6985565f80e3603a799b16 100644 (file)
@@ -5,7 +5,7 @@ LLVM_STRIP ?= llvm-strip
 BPFTOOL ?= bin/bpftool
 LIBBPF_SRC := $(abspath ../src/cc/libbpf/src)
 LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
-INCLUDES := -I$(OUTPUT)
+INCLUDES := -I$(OUTPUT) -I../src/cc/libbpf/include/uapi
 CFLAGS := -g -O2 -Wall
 INSTALL ?= install
 prefix ?= /usr/local