@@ -38,15 +38,15 @@ once_cell = { version = "1.5.2", optional = true }
38
38
[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 ]
39
39
linux-raw-sys = { version = " 0.4.12" , default-features = false , features = [" general" , " errno" , " ioctl" , " no_std" , " elf" ] }
40
40
libc_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 }
42
42
43
43
# Dependencies for platforms where only libc is supported:
44
44
#
45
45
# On all other Unix-family platforms, and under Miri, we always use the libc
46
46
# backend, so enable its dependencies unconditionally.
47
47
[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 ]
48
48
libc_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 }
50
50
51
51
# Additional dependencies for Linux with the libc backend:
52
52
#
@@ -123,10 +123,14 @@ default = ["std", "use-libc-auxv"]
123
123
124
124
# This enables use of std. Disabling this enables `#![no_std]`, and requires
125
125
# 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 " ]
127
127
128
128
# 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" ]
130
134
131
135
# Enable `rustix::event::*`.
132
136
event = []
0 commit comments