diff options
Diffstat (limited to 'vendor/rustix/src/system.rs')
-rw-r--r-- | vendor/rustix/src/system.rs | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/vendor/rustix/src/system.rs b/vendor/rustix/src/system.rs index 1f04c6b20..9346f5560 100644 --- a/vendor/rustix/src/system.rs +++ b/vendor/rustix/src/system.rs @@ -8,7 +8,7 @@ use crate::backend; use crate::ffi::CStr; -#[cfg(not(target_os = "emscripten"))] +#[cfg(not(any(target_os = "espidf", target_os = "emscripten")))] use crate::io; use core::fmt; @@ -21,9 +21,23 @@ pub use backend::system::types::Sysinfo; /// # References /// - [POSIX] /// - [Linux] +/// - [Apple] +/// - [NetBSD] +/// - [FreeBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/uname.html /// [Linux]: https://man7.org/linux/man-pages/man2/uname.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/uname.3.html +/// [NetBSD]: https://man.netbsd.org/uname.3 +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=uname&sektion=3 +/// [OpenBSD]: https://man.openbsd.org/uname.3 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=uname§ion=3 +/// [illumos]: https://illumos.org/man/2/uname +/// [glibc]: https://www.gnu.org/software/libc/manual/html_node/Platform-Type.html #[inline] pub fn uname() -> Uname { Uname(backend::system::syscalls::uname()) @@ -130,7 +144,12 @@ pub fn sysinfo() -> Sysinfo { /// - [Linux] /// /// [Linux]: https://man7.org/linux/man-pages/man2/sethostname.2.html -#[cfg(not(any(target_os = "emscripten", target_os = "redox", target_os = "wasi")))] +#[cfg(not(any( + target_os = "emscripten", + target_os = "espidf", + target_os = "redox", + target_os = "wasi" +)))] #[inline] pub fn sethostname(name: &[u8]) -> io::Result<()> { backend::system::syscalls::sethostname(name) |