system-configuration-rs icon indicating copy to clipboard operation
system-configuration-rs copied to clipboard

`sockaddr_in` does not have this field (Rust 1.81 on Linux)

Open tgsmith61591 opened this issue 1 year ago • 2 comments

I am getting the following build error from system_configuration v0.6.1 when building on Linux:

ERROR: /root/.cache/bazel/_bazel_root/f1dda70852d9c97abf4f8f9fda6b2822/external/rules_rust~~crate~crates_index__system-configuration-0.6.1/BUILD.bazel:16:13: Compiling Rust rlib system_configuration v0.6.1 (7 files) failed: (Exit 1): process_wrapper failed: error executing Rustc command (from target @@rules_rust~~crate~crates_index__system-configuration-0.6.1//:system_configuration) bazel-out/aarch64-opt-exec-ST-d57f47055a04/bin/external/rules_rust~/util/process_wrapper/process_wrapper --arg-file ... (remaining 34 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
error[E0560]: struct `sockaddr_in` has no field named `sin_len`
   --> external/rules_rust~~crate~crates_index__system-configuration-0.6.1/src/network_reachability.rs:351:13
    |
351 |             sin_len: std::mem::size_of::<libc::sockaddr_in>() as u8,
    |             ^^^^^^^ `sockaddr_in` does not have this field
    |
    = note: all struct fields are already assigned

tgsmith61591 avatar Nov 19 '24 20:11 tgsmith61591

I also got that error. Looking forward to see this fixed.

hofbi avatar Apr 24 '25 16:04 hofbi

I think what you want is to exclude this module from compilation on Linux. Put it in the right "dependencies" section.

pronebird avatar May 05 '25 13:05 pronebird