diff --git a/Cargo.toml b/Cargo.toml index 89a3fad33..53dacf72b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ rustc-std-workspace-alloc = { version = "1.0.0", optional = true } # not aliased [target.'cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))'.dependencies] linux-raw-sys = { version = "0.11.0", default-features = false, features = ["auxvec", "general", "errno", "ioctl", "no_std", "elf"] } libc_errno = { package = "errno", version = "0.3.10", default-features = false, optional = true } -libc = { version = "0.2.177", default-features = false, optional = true } +libc = { version = "0.2.181", default-features = false, optional = true } # Dependencies for platforms where only libc is supported: # @@ -43,7 +43,7 @@ libc = { version = "0.2.177", default-features = false, optional = true } # backend, so enable its dependencies unconditionally. [target.'cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64")))))))'.dependencies] libc_errno = { package = "errno", version = "0.3.10", default-features = false } -libc = { version = "0.2.177", default-features = false } +libc = { version = "0.2.181", default-features = false } # Additional dependencies for Linux and Android with the libc backend: # diff --git a/src/backend/libc/fs/makedev.rs b/src/backend/libc/fs/makedev.rs index 188075506..ca0b48eaa 100644 --- a/src/backend/libc/fs/makedev.rs +++ b/src/backend/libc/fs/makedev.rs @@ -14,7 +14,6 @@ use crate::fs::Dev; target_os = "aix", target_os = "android", target_os = "emscripten", - target_os = "redox", )))] #[inline] pub(crate) fn makedev(maj: u32, min: u32) -> Dev { @@ -45,17 +44,6 @@ pub(crate) fn makedev(maj: u32, min: u32) -> Dev { | (u64::from(min) & 0x0000_00ff_u64) } -#[cfg(target_os = "redox")] -#[inline] -pub(crate) fn makedev(maj: u32, min: u32) -> Dev { - // Redox's makedev is reportedly similar to 32-bit Android's but the return - // type is signed. - ((i64::from(maj) & 0xffff_f000_i64) << 32) - | ((i64::from(maj) & 0x0000_0fff_i64) << 8) - | ((i64::from(min) & 0xffff_ff00_i64) << 12) - | (i64::from(min) & 0x0000_00ff_i64) -} - #[cfg(target_os = "emscripten")] #[inline] pub(crate) fn makedev(maj: u32, min: u32) -> Dev { @@ -83,7 +71,6 @@ pub(crate) fn makedev(maj: u32, min: u32) -> Dev { target_os = "android", target_os = "emscripten", target_os = "netbsd", - target_os = "redox" )))] #[inline] pub(crate) fn major(dev: Dev) -> u32 { @@ -102,10 +89,7 @@ pub(crate) fn major(dev: Dev) -> u32 { (unsafe { c::major(dev) }) as u32 } -#[cfg(any( - all(target_os = "android", target_pointer_width = "32"), - target_os = "redox" -))] +#[cfg(all(target_os = "android", target_pointer_width = "32"))] #[inline] pub(crate) fn major(dev: Dev) -> u32 { // 32-bit Android's `dev_t` is 32-bit, but its `st_dev` is 64-bit, so we do @@ -126,7 +110,6 @@ pub(crate) fn major(dev: Dev) -> u32 { target_os = "android", target_os = "emscripten", target_os = "netbsd", - target_os = "redox", )))] #[inline] pub(crate) fn minor(dev: Dev) -> u32 { @@ -145,10 +128,7 @@ pub(crate) fn minor(dev: Dev) -> u32 { (unsafe { c::minor(dev) }) as u32 } -#[cfg(any( - all(target_os = "android", target_pointer_width = "32"), - target_os = "redox" -))] +#[cfg(all(target_os = "android", target_pointer_width = "32"))] #[inline] pub(crate) fn minor(dev: Dev) -> u32 { // 32-bit Android's `dev_t` is 32-bit, but its `st_dev` is 64-bit, so we do