[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87sfvc59hc.fsf@toke.dk>
Date: Wed, 01 Dec 2021 21:57:35 +0100
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Alexander Lobakin <alexandr.lobakin@...el.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>
Cc: Alexander Lobakin <alexandr.lobakin@...el.com>,
Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
Magnus Karlsson <magnus.karlsson@...el.com>,
Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, netdev@...r.kernel.org,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next] samples: bpf: fix conflicting types in
fds_example
Alexander Lobakin <alexandr.lobakin@...el.com> writes:
> Fix the following samples/bpf build error appeared after the
> introduction of bpf_map_create() in libbpf:
>
> CC samples/bpf/fds_example.o
> samples/bpf/fds_example.c:49:12: error: static declaration of 'bpf_map_create' follows non-static declaration
> static int bpf_map_create(void)
> ^
> samples/bpf/libbpf/include/bpf/bpf.h:55:16: note: previous declaration is here
> LIBBPF_API int bpf_map_create(enum bpf_map_type map_type,
> ^
> samples/bpf/fds_example.c:82:23: error: too few arguments to function call, expected 6, have 0
> fd = bpf_map_create();
> ~~~~~~~~~~~~~~ ^
> samples/bpf/libbpf/include/bpf/bpf.h:55:16: note: 'bpf_map_create' declared here
> LIBBPF_API int bpf_map_create(enum bpf_map_type map_type,
> ^
> 2 errors generated.
>
> fds_example by accident has a static function with the same name.
> It's not worth it to separate a single call into its own function,
> so just embed it.
>
> Fixes: 992c4225419a ("libbpf: Unify low-level map creation APIs w/ new bpf_map_create()")
> Signed-off-by: Alexander Lobakin <alexandr.lobakin@...el.com>
> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
I just ran into this today as well - thanks for the fix!
Acked-by: Toke Høiland-Jørgensen <toke@...hat.com>
Powered by blists - more mailing lists