On Wed, Mar 17, 2021 at 10:38 AM Andrii Nakryiko
<andrii.nakry...@gmail.com> wrote:
> > diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
> > index 62953bbf68b4..ff6a76632873 100644
> > --- a/tools/bpf/bpftool/btf.c
> > +++ b/tools/bpf/bpftool/btf.c
> > @@ -405,6 +405,8 @@ static int dump_btf_c(const struct btf *btf,
> >         printf("#ifndef __VMLINUX_H__\n");
> >         printf("#define __VMLINUX_H__\n");
> >         printf("\n");
> > +       printf("#define NULL ((void *)0)\n");
>
>
> On second thought, this could also be done in bpf_helpers.h, which is
> pretty much always included in BPF programs. I think that's a bit more
> maintainable and less magical to users, so I'll go with that in v3.

yep. good idea.

Reply via email to