On Mon, Nov 29, 2021 at 08:09:55PM -0800, Andrii Nakryiko wrote: > > oh, I thought you added those fields initially and forgot to delete or > something, didn't notice that you are just "opting them out" for > __KERNEL__. I think libbpf code doesn't strictly need this, here's the > diff that completely removes their use, it's pretty straightforward > and minimal, so maybe instead of #ifdef'ing let's just do that? Cool. Folded it into my series as another patch with your SOB. > diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c > index b59fede08ba7..95fa57eea289 100644 > --- a/tools/lib/bpf/libbpf.c > +++ b/tools/lib/bpf/libbpf.c > @@ -5179,15 +5179,18 @@ static int bpf_core_add_cands(struct > bpf_core_cand *local_cand, > struct bpf_core_cand_list *cands) > { > struct bpf_core_cand *new_cands, *cand; > - const struct btf_type *t; > - const char *targ_name; > + const struct btf_type *t, *local_t; > + const char *targ_name, *local_name; I wish you've inserted the patch without mangling. Thankfully it was short enough to repeat manually. No big deal.