spease / wpa-ctrl-rs

wpa supplicant control interface wrapper for rust
MIT License
10 stars 10 forks source link

Issue while compiling for Raspberry 4 B #7

Closed MatijaBistrovic closed 2 years ago

MatijaBistrovic commented 2 years ago

While compiling for Raspberry 4 B there is a problem with this:

error[E0308]: mismatched types --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/wpactrl-0.4.0/src/wpactrl.rs:124:25 | 124 | tv_sec: duration.as_secs() as i64, | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found i64

error[E0308]: mismatched types --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/wpactrl-0.4.0/src/wpactrl.rs:125:26 | 125 | tv_usec: duration.subsec_micros() as i64, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found i64

Changing the i64 to i32 or isize in the source solves the issue, but the problem is the project which uses this is will be automatically installed/updated by a third service on multiple raspberries so it always pulls the code from the crate repository and would always cause this bug on every new install/update.

spease commented 2 years ago

Thanks for your patience. Can you confirm that #8 should solve the issue?

Also, it's probably time for me to bump the dependencies. Will this cause any issues for your use case that you know of?

MatijaBistrovic commented 2 years ago

Yes #8 does solve the issue.

As far as I know there should't be any issues with bumping the dependencies.

spease commented 2 years ago

I've pushed a new version (0.5.1) that will include this change. Note that I also went through a bunch of clippy lints and renamed WpaError -> Error and WpaCtrl -> Client in the API, so you might need some minor code changes. However only the names changed to be less redundant, no significant functionality changes should be present.