mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-30 04:50:24 +00:00
905960f752
In Rust c_char can be aliased to i8 or u8, depending on the particular target architecture. For example, trying to build scx_lavd on ppc64 triggers the following error: error[E0308]: mismatched types --> src/main.rs:200:38 | 200 | let c_tx_cm: *const c_char = (&tx.comm as *const [i8; 17]) as *const i8; | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*const u8`, found `*const i8` | | | expected due to this | = note: expected raw pointer `*const u8` found raw pointer `*const i8` To fix this, consistently use c_char instead of assuming it corresponds to i8. Signed-off-by: Andrea Righi <andrea.righi@canonical.com> |
||
---|---|---|
.. | ||
bpf | ||
bpf_intf.rs | ||
bpf_skel.rs | ||
main.rs |