On Mon, Nov 29, 2021 at 9:05 PM Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote: > > 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. > Sounds good, thanks. > > 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. Sorry, I actually don't know how to do it with Gmail :( It always replaces tabs with spaces and I haven't found a way around that.