diff options
| author | Kuba Piecuch <jpiecuch@google.com> | 2026-04-13 18:50:05 +0300 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-04-13 19:14:11 +0300 |
| commit | 7e311bafb9ad3a4711c08c00b09fb7839ada37f0 (patch) | |
| tree | 12d99bb75cf0a4f24f9b04fffba12331c3ca5420 | |
| parent | 4615361f0b148c172852590e6245a953cc075b73 (diff) | |
| download | linux-7e311bafb9ad3a4711c08c00b09fb7839ada37f0.tar.xz | |
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 <jpiecuch@google.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
| -rw-r--r-- | tools/sched_ext/include/scx/common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/sched_ext/include/scx/common.h b/tools/sched_ext/include/scx/common.h index 823251fc4715..60f5513787d6 100644 --- a/tools/sched_ext/include/scx/common.h +++ b/tools/sched_ext/include/scx/common.h @@ -67,6 +67,7 @@ typedef int64_t s64; bpf_map__set_value_size((__skel)->maps.elfsec##_##arr, \ sizeof((__skel)->elfsec##_##arr->arr[0]) * (n)); \ (__skel)->elfsec##_##arr = \ + (typeof((__skel)->elfsec##_##arr)) \ bpf_map__initial_value((__skel)->maps.elfsec##_##arr, &__sz); \ } while (0) |
