Em Tue, May 09, 2023 at 06:36:49AM +0000, Yang Jihong escreveu:OK, will send v2 patch, use Makefile to specify path of header file that is preferentially used. Pls check whether the solution is OK.
Currently, vmlinux.h uses the bpf.h and perf_event.h header files in the
system path. If the header files in compilation environment are old,
compilation may fail. For example:
/home/yangjihong/linux/tools/perf/util/bpf_skel/.tmp/../vmlinux.h:151:27: error: field has incomplete type 'union perf_sample_weight'
union perf_sample_weight weight;
Can this be solved in the Makefile directives for building BPF targets?