]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Add _GNU_SOURCE for reallocarray to ringbuf.c
authorAndrii Nakryiko <andriin@fb.com>
Mon, 1 Jun 2020 20:26:01 +0000 (13:26 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Jun 2020 22:13:04 +0000 (15:13 -0700)
commit0cac1a6ffc9c6c7f00b3c570da3e3f007d313ed4
tree966abc0e092da570677472003cf1ca09939f9f4d
parente8ecc86b1191da65edfeaaa7a9024188193e786b
libbpf: Add _GNU_SOURCE for reallocarray to ringbuf.c

On systems with recent enough glibc, reallocarray compat won't kick in, so
reallocarray() itself has to come from stdlib.h include. But _GNU_SOURCE is
necessary to enable it. So add it.

Fixes: 001a8f977507 ("libbpf: Add BPF ring buffer support")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20200601202601.2139477-1-andriin@fb.com
tools/lib/bpf/ringbuf.c