use proper sync for function pointers
This is a correction for previous patch where
function pointer is not proper specified
static int bpf_map_push_elem(struct bpf_map *map, const void *value, u64 flags) =
(void *) BPF_FUNC_map_push_elem;
and some old gcc compiler (e.g., ubuntu 16.04) will complain
with error:
Illegal initializer (only variables can be initialized)
The correct way is
static int (*bpf_map_push_elem)(struct bpf_map *map, const void *value, u64 flags) =
(void *) BPF_FUNC_map_push_elem;
Signed-off-by: Yonghong Song <yhs@fb.com>
Showing
Please register or sign in to comment