lkml.org 
[lkml]   [2020]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] libbpf bpf_helpers: Use __builtin_offsetof for offsetof
On Sun, Jul 19, 2020 at 11:21 PM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Sun, Jul 19, 2020 at 11:18 PM Ian Rogers <irogers@google.com> 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 guard. Rather than add additional
> > dependencies improve the offsetof macro declared here to use the
> > builtin that is available since llvm 3.7 (the first with a BPF backend).
> >
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
>
> Acked-by: Andrii Nakryiko <andriin@fb.com>

Applied. Thanks

\
 
 \ /
  Last update: 2020-07-21 21:29    [W:0.036 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site