From 94d7ab8e4dd227915f8cf6d530567e8008b51fa5 Mon Sep 17 00:00:00 2001 From: Thibaut Vandervelden Date: Mon, 5 Aug 2024 12:02:15 +0200 Subject: [PATCH 1/2] Remove unknown target-arch for TUNSETIFF syscalls The endianness of the target architecture cannot be specified using target_arch. The endianness can be specified using target_endian. The target description for mipsel-unknown-linux-gnu is found here: https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_gnu.rs In this specification, the arch is set to "mips" and not "mipsel". --- src/phy/sys/linux.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/phy/sys/linux.rs b/src/phy/sys/linux.rs index c73eb4f5..6c3388e3 100644 --- a/src/phy/sys/linux.rs +++ b/src/phy/sys/linux.rs @@ -9,12 +9,12 @@ pub const ETH_P_IEEE802154: libc::c_short = 0x00F6; // https://github.com/golang/sys/blob/master/unix/zerrors_linux_.go pub const TUNSETIFF: libc::c_ulong = if cfg!(any( target_arch = "mips", + all(target_arch = "mips", target_endian = "little"), target_arch = "mips64", - target_arch = "mips64el", - target_arch = "mipsel", + all(target_arch = "mips64", target_endian = "little"), target_arch = "powerpc", target_arch = "powerpc64", - target_arch = "powerpc64le", + all(target_arch = "powerpc64", target_endian = "little"), target_arch = "sparc64" )) { 0x800454CA From 86e56ad16279988ab4fd905312fb62d8f8d5ecaa Mon Sep 17 00:00:00 2001 From: Thibaut Vandervelden Date: Mon, 5 Aug 2024 12:22:49 +0200 Subject: [PATCH 2/2] Remove warning for `fuzzing` feature The warning is added in 1.80.0, but can be disabled by updating the Cargo.toml file. --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 576cf175..5a9a5fb7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,9 @@ license = "0BSD" # ensure that the correct features are enabled. autoexamples = false +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } + [dependencies] managed = { version = "0.8", default-features = false, features = ["map"] } byteorder = { version = "1.0", default-features = false }