Skip to content

Commit 7e311ba

Browse files
Kuba Piecuchhtejun
authored andcommitted
tools/sched_ext: Add explicit cast from void* in RESIZE_ARRAY()
This fixes the following compilation error when using the header from C++ code: error: assigning to 'struct scx_flux__data_uei_dump *' from incompatible type 'void *' Signed-off-by: Kuba Piecuch <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 4615361 commit 7e311ba

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tools/sched_ext/include/scx/common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ typedef int64_t s64;
6767
bpf_map__set_value_size((__skel)->maps.elfsec##_##arr, \
6868
sizeof((__skel)->elfsec##_##arr->arr[0]) * (n)); \
6969
(__skel)->elfsec##_##arr = \
70+
(typeof((__skel)->elfsec##_##arr)) \
7071
bpf_map__initial_value((__skel)->maps.elfsec##_##arr, &__sz); \
7172
} while (0)
7273

0 commit comments

Comments
 (0)