Skip to content

Commit

Permalink
Use explicit type conversion for void * to u64.
Browse files Browse the repository at this point in the history
clang15 prevents implicit type conversion of void * to u64
fix iovisor#4467

Signed-off-by: Y7n05h <[email protected]>
  • Loading branch information
Y7n05h authored and chenhengqi committed Feb 9, 2023
1 parent f279656 commit cbec3b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cc/export/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ static int (*bpf_probe_read_str)(void *dst, u64 size, const void *unsafe_ptr) =
(void *) BPF_FUNC_probe_read_str;
int bpf_trace_printk(const char *fmt, ...) asm("llvm.bpf.extra");
static inline __attribute__((always_inline))
void bpf_tail_call_(u64 map_fd, void *ctx, int index) {
((void (*)(void *, u64, int))BPF_FUNC_tail_call)(ctx, map_fd, index);
void bpf_tail_call_(void *map_fd, void *ctx, int index) {
((void (*)(void *, u64, int))BPF_FUNC_tail_call)(ctx, (u64)map_fd, index);
}
static int (*bpf_clone_redirect)(void *ctx, int ifindex, u32 flags) =
(void *) BPF_FUNC_clone_redirect;
Expand Down

0 comments on commit cbec3b6

Please sign in to comment.