mozilla / cubeb-pulse-rs

ISC License
16 stars 17 forks source link

error[E0308]: mismatched types #14

Closed stransky closed 7 years ago

stransky commented 7 years ago

I tried to build Firefox 55 on arm and I get:

Compiling cubeb-pulse v0.0.1 (file:///builddir/build/BUILD/firefox-55.0/media/libcubeb/cubeb-pulse-rs) error[E0308]: mismatched types --> /builddir/build/BUILD/firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/context.rs:97:46 97 context_name: name, ^^^^ expected u8, found i8

= note: expected type *const u8 found type *const i8 = help: here are some functions which might fulfill your needs:

rillian commented 7 years ago

Looks like a signed-vs-unsigned char issue. new takes a *const c_char but _new takes a *const i8. Which is odd because it stores it in Context::context_name which is a *const c_char again.

Does it build if you just change the _new argument type to *const c_char?

rillian commented 7 years ago

nb this should be fixed upstream by 782f6a88 which is in Firefox 56, so you'll need to patch this for for Firefox 55.

stransky commented 7 years ago

Thanks, I'll try to backport it then.