Jelajahi Sumber

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".
Thibaut Vandervelden 8 bulan lalu
induk
melakukan
94d7ab8e4d
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      src/phy/sys/linux.rs

+ 3 - 3
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_<arch>.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