libspa's static_dict! only works on x86_64 and x86
On Fedora 35 and Rawhide, on all architectures except x86 and x86_64, I'm getting compilation errors in libspa and pipewire unless I disable tests that make use of static_dict!
. This happens on armv7hl, aarch64, ppc64le, and s390x.
error[E0308]: mismatched types
--> src/dict.rs:412:26
|
412 | key: concat!($k, "\0").as_ptr() as *const i8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
...
495 | let dict = static_dict! {
| ____________________-
496 | | "K0" => "V0",
497 | | "K1" => "V1"
498 | | };
| |_________- in this macro invocation
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
= note: this error originates in the macro `static_dict` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> src/dict.rs:413:28
|
413 | value: concat!($v, "\0").as_ptr() as *const i8
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
...
495 | let dict = static_dict! {
| ____________________-
496 | | "K0" => "V0",
497 | | "K1" => "V1"
498 | | };
| |_________- in this macro invocation
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
= note: this error originates in the macro `static_dict` (in Nightly builds, run with -Z macro-backtrace for more info)