From 9835e2ae736235810b4ea1c162ca5e65c547e770 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 04:49:50 +0200 Subject: Merging upstream version 1.71.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/rustix/src/lib.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'vendor/rustix/src/lib.rs') diff --git a/vendor/rustix/src/lib.rs b/vendor/rustix/src/lib.rs index 9e62b1594..f0e093585 100644 --- a/vendor/rustix/src/lib.rs +++ b/vendor/rustix/src/lib.rs @@ -97,7 +97,7 @@ #![cfg_attr(linux_raw, deny(unsafe_code))] #![cfg_attr(rustc_attrs, feature(rustc_attrs))] #![cfg_attr(doc_cfg, feature(doc_cfg))] -#![cfg_attr(all(target_os = "wasi", feature = "std"), feature(wasi_ext))] +#![cfg_attr(all(wasi_ext, target_os = "wasi", feature = "std"), feature(wasi_ext))] #![cfg_attr( all(linux_raw, naked_functions, target_arch = "x86"), feature(naked_functions) @@ -122,6 +122,9 @@ #![allow(clippy::unnecessary_cast)] // It is common in linux and libc APIs for types to vary between platforms. #![allow(clippy::useless_conversion)] +// Redox and WASI have enough differences that it isn't worth +// precisely conditionallizing all the `use`s for them. +#![cfg_attr(any(target_os = "redox", target_os = "wasi"), allow(unused_imports))] #[cfg(not(feature = "rustc-dep-of-std"))] extern crate alloc; @@ -134,6 +137,18 @@ pub(crate) mod cstr; pub(crate) mod const_assert; pub(crate) mod utils; +// linux_raw: Weak symbols are used by the use-libc-auxv feature for +// glibc 2.15 support. +// +// libc: Weak symbols are used to call various functions available in some +// versions of libc and not others. +#[cfg(any( + all(linux_raw, feature = "use-libc-auxv"), + all(libc, not(any(windows, target_os = "wasi"))) +))] +#[macro_use] +mod weak; + // Pick the backend implementation to use. #[cfg_attr(libc, path = "backend/libc/mod.rs")] #[cfg_attr(linux_raw, path = "backend/linux_raw/mod.rs")] -- cgit v1.2.3