summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAlexander Lobakin <alexandr.lobakin@intel.com>2021-12-01 19:49:31 +0300
committerAndrii Nakryiko <andrii@kernel.org>2021-12-02 01:29:56 +0300
commit64b5b97b8cfff64409fcc234ae3151bc8de0c4d6 (patch)
treee63f1ed5fe78c514ac20787e0e685bbc6c8ecb2d /kernel
parent436d404cc8ff573a417cb3b6a5c76655121aceac (diff)
downloadlinux-64b5b97b8cfff64409fcc234ae3151bc8de0c4d6.tar.xz
samples: bpf: Fix conflicting types in fds_example
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@intel.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://lore.kernel.org/bpf/20211201164931.47357-1-alexandr.lobakin@intel.com
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions