Hugal31 / yara-rust

Rust bindings for VirusTotal/Yara
Apache License 2.0
73 stars 29 forks source link

fix compilation of 0.16 release on i686 #91

Closed vthib closed 1 year ago

vthib commented 1 year ago

The current release do not build on x86 since 4bb31911036722b03a2e0239b564b4b813fb5180

This is because a field of a sys struct is being filled with a value of type u64. This field is declared as size_t in C, which is bindgen'd into either a u64 on x86_64 (thus it compiles), or a u32 on i686 (thus the compilation error).

Fix this by letting the compiler pick the right cast.

Would be nice to have a build on x86 in the github workflows to catch those!

Hugal31 commented 1 year ago

Good catch, I'll set up a x86 build action.