Dependency windows-sys should be gated via:
[target.'cfg(target_os = "windows")'.dependencies]
Currently it's included unconditionally, so builds fail on Linux:
error[E0425]: cannot find type `WSADATA` in this scope
--> /builds/raspbeguy/aports/testing/lore/tmp/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Networking/WinSock/mod.rs:167:99
|
167 | windows_link::link!("ws2_32.dll" "system" fn WSAStartup(wversionrequested : u16, lpwsadata : *mut WSADATA) -> i32);
| ^^^^^^^
...
5732 | pub struct WSPDATA {
| ------------------ similarly named struct `WSPDATA` defined here
|
help: a struct with a similar name exists
|
167 - windows_link::link!("ws2_32.dll" "system" fn WSAStartup(wversionrequested : u16, lpwsadata : *mut WSADATA) -> i32);
167 + windows_link::link!("ws2_32.dll" "system" fn WSAStartup(wversionrequested : u16, lpwsadata : *mut WSPDATA) -> i32);
|
error[E0425]: cannot find type `SERVENT` in this scope
--> /builds/raspbeguy/aports/testing/lore/tmp/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Networking/WinSock/mod.rs:237:135
|
237 | ...CSTR, proto : windows_sys::core::PCSTR) -> *mut SERVENT);
| ^^^^^^^ not found in this scope
error[E0425]: cannot find type `SERVENT` in this scope
--> /builds/raspbeguy/aports/testing/lore/tmp/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Networking/WinSock/mod.rs:238:114
|
238 | windows_link::link!("ws2_32.dll" "system" fn getservbyport(port : i32, proto : windows_sys::core::PCSTR) -> *mut SERVENT);
| ^^^^^^^ not found in this scope
error[E0425]: cannot find type `XSAVE_FORMAT` in this scope
--> /builds/raspbeguy/aports/testing/lore/tmp/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/System/Diagnostics/Debug/mod.rs:6372:22
|
6372 | pub LegacyState: XSAVE_FORMAT,
| ^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find type `XSAVE_FORMAT` in this scope
--> /builds/raspbeguy/aports/testing/lore/tmp/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/System/Diagnostics/Debug/mod.rs:6372:22
|
6372 | pub LegacyState: XSAVE_FORMAT,
| ^^^^^^^^^^^^ not found in this scope
|
help: you might be missing a type parameter
|
6371 | pub struct XSAVE_AREA<XSAVE_FORMAT> {
| ++++++++++++++
For some reason, they don't fail on x86_64, but fail on at least 5 other architectures.
Dependency
windows-sysshould be gated via:Currently it's included unconditionally, so builds fail on Linux:
For some reason, they don't fail on x86_64, but fail on at least 5 other architectures.