@@ -38,15 +38,15 @@ once_cell = { version = "1.5.2", optional = true }
3838[target .'cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc64"), 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 ]
3939linux-raw-sys = { version = " 0.4.12" , default-features = false , features = [" general" , " errno" , " ioctl" , " no_std" , " elf" ] }
4040libc_errno = { package = " errno" , version = " 0.3.8" , default-features = false , optional = true }
41- libc = { version = " 0.2.153" , default-features = false , features = [ " extra_traits " ], optional = true }
41+ libc = { version = " 0.2.153" , default-features = false , optional = true }
4242
4343# Dependencies for platforms where only libc is supported:
4444#
4545# On all other Unix-family platforms, and under Miri, we always use the libc
4646# backend, so enable its dependencies unconditionally.
4747[target .'cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc64"), 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 ]
4848libc_errno = { package = " errno" , version = " 0.3.8" , default-features = false }
49- libc = { version = " 0.2.153" , default-features = false , features = [ " extra_traits " ] }
49+ libc = { version = " 0.2.153" , default-features = false }
5050
5151# Additional dependencies for Linux with the libc backend:
5252#
@@ -123,10 +123,14 @@ default = ["std", "use-libc-auxv"]
123123
124124# This enables use of std. Disabling this enables `#![no_std]`, and requires
125125# Rust 1.64 or newer.
126- std = [" bitflags/std" , " alloc" , " libc?/std" , " libc_errno?/std" ]
126+ std = [" bitflags/std" , " alloc" , " libc?/std" , " libc_errno?/std" , " libc-extra-traits " ]
127127
128128# Enable this to request the libc backend.
129- use-libc = [" libc_errno" , " libc" ]
129+ use-libc = [" libc_errno" , " libc" , " libc-extra-traits" ]
130+
131+ # Enable `extra_traits` in libc types, to provide `Debug`, `Hash`, and other
132+ # trait impls for libc types.
133+ libc-extra-traits = [" libc?/extra_traits" ]
130134
131135# Enable `rustix::event::*`.
132136event = []
0 commit comments