-
Notifications
You must be signed in to change notification settings - Fork 14
fix: support musl libc target for linux platform #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
target - Replace manual msghdr struct initialization with mem::zeroed() for safety - Fix type conversion for msg_controllen field from usize to libc type - Fix type conversion for cmsg_len field in control count calculation - Apply consistent unsafe zeroed initialization for both send and receive paths
|
cargo build --target=x86_64-unknown-linux-musl -p ipmb error[E0308]: mismatched types error[E0308]: mismatched types error[E0277]: cannot subtract error[E0308]: mismatched types error[E0277]: cannot divide error: cannot construct error[E0308]: mismatched types Some errors have detailed explanations: E0277, E0308. error[E0308]: mismatched types error[E0308]: mismatched types error[E0277]: cannot subtract error[E0308]: mismatched types error[E0277]: cannot divide error: cannot construct error[E0308]: mismatched types Some errors have detailed explanations: E0277, E0308. error[E0308]: mismatched types error[E0308]: mismatched types error[E0277]: cannot subtract error[E0308]: mismatched types error[E0277]: cannot divide error: cannot construct error[E0308]: mismatched types Some errors have detailed explanations: E0277, E0308. |
|
Thanks. |
|
Hi @xiaopengli89, Would you please update this to crates.io as soon as possible? We have a project that's actively using this library and would really appreciate having this fix available. Thank you! |
|
|
tks |
Use mem::zeroed() to initialize msghdr struct instead of struct literal
syntax, as musl libc has private padding fields (__pad1, __pad2) that
prevent direct construction. Also add type casts for msg_controllen and
cmsg_len to handle the type difference between musl (u32) and glibc
(usize).