Re: [PATCH v2] libbpf bpf_helpers: Use __builtin_offsetof for offsetof

2020-07-21 Thread Alexei Starovoitov
On Sun, Jul 19, 2020 at 11:21 PM Andrii Nakryiko wrote: > > On Sun, Jul 19, 2020 at 11:18 PM Ian Rogers wrote: > > > > The non-builtin route for offsetof has a dependency on size_t from > > stdlib.h/stdint.h that is undeclared and may break targets. > > The offsetof macro in bpf_helpers may disab

Re: [PATCH v2] libbpf bpf_helpers: Use __builtin_offsetof for offsetof

2020-07-19 Thread Andrii Nakryiko
On Sun, Jul 19, 2020 at 11:18 PM Ian Rogers wrote: > > The non-builtin route for offsetof has a dependency on size_t from > stdlib.h/stdint.h that is undeclared and may break targets. > The offsetof macro in bpf_helpers may disable the same macro in other > headers that have a #ifdef offsetof guar