Re: [PATCH bpf-next 1/4] bpftool: generate NULL definition in vmlinux.h

2021-03-16 Thread Andrii Nakryiko
On Tue, Mar 16, 2021 at 8:03 PM Andrii Nakryiko wrote: > > Given that vmlinux.h is not compatible with headers like stdint.h, NULL poses > an annoying problem: it is defined as #define, so is not captured in BTF, so > is not emitted into vmlinux.h. This leads to users either sticking to explicit >

[PATCH bpf-next 1/4] bpftool: generate NULL definition in vmlinux.h

2021-03-16 Thread Andrii Nakryiko
Given that vmlinux.h is not compatible with headers like stdint.h, NULL poses an annoying problem: it is defined as #define, so is not captured in BTF, so is not emitted into vmlinux.h. This leads to users either sticking to explicit 0, or defining their own NULL (as progs/skb_pkt_end.c does). It'