summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/fs/fd.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/fs/fd.rs')
-rw-r--r--vendor/rustix/src/fs/fd.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/vendor/rustix/src/fs/fd.rs b/vendor/rustix/src/fs/fd.rs
index d0d50073e..43b2e57b1 100644
--- a/vendor/rustix/src/fs/fd.rs
+++ b/vendor/rustix/src/fs/fd.rs
@@ -8,7 +8,7 @@ use crate::fs::{OFlags, SeekFrom, Timespec};
use crate::{backend, io};
use backend::fd::{AsFd, BorrowedFd};
-#[cfg(not(target_os = "wasi"))]
+#[cfg(not(any(target_os = "espidf", target_os = "wasi")))]
pub use backend::fs::types::FlockOperation;
#[cfg(not(any(
@@ -16,6 +16,8 @@ pub use backend::fs::types::FlockOperation;
solarish,
target_os = "aix",
target_os = "dragonfly",
+ target_os = "espidf",
+ target_os = "nto",
target_os = "redox",
)))]
pub use backend::fs::types::FallocateFlags;
@@ -24,8 +26,10 @@ pub use backend::fs::types::Stat;
#[cfg(not(any(
solarish,
+ target_os = "espidf",
target_os = "haiku",
target_os = "netbsd",
+ target_os = "nto",
target_os = "redox",
target_os = "wasi",
)))]
@@ -161,8 +165,10 @@ pub fn fstat<Fd: AsFd>(fd: Fd) -> io::Result<Stat> {
/// [Linux]: https://man7.org/linux/man-pages/man2/fstatfs.2.html
#[cfg(not(any(
solarish,
+ target_os = "espidf",
target_os = "haiku",
target_os = "netbsd",
+ target_os = "nto",
target_os = "redox",
target_os = "wasi",
)))]
@@ -199,6 +205,7 @@ pub fn fstatvfs<Fd: AsFd>(fd: Fd) -> io::Result<StatVfs> {
///
/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
/// [Linux]: https://man7.org/linux/man-pages/man2/utimensat.2.html
+#[cfg(not(target_os = "espidf"))]
#[inline]
pub fn futimens<Fd: AsFd>(fd: Fd, times: &Timestamps) -> io::Result<()> {
backend::fs::syscalls::futimens(fd.as_fd(), times)
@@ -224,6 +231,8 @@ pub fn futimens<Fd: AsFd>(fd: Fd, times: &Timestamps) -> io::Result<()> {
solarish,
target_os = "aix",
target_os = "dragonfly",
+ target_os = "espidf",
+ target_os = "nto",
target_os = "redox",
)))] // not implemented in libc for netbsd yet
#[inline]
@@ -292,6 +301,7 @@ pub fn fsync<Fd: AsFd>(fd: Fd) -> io::Result<()> {
#[cfg(not(any(
apple,
target_os = "dragonfly",
+ target_os = "espidf",
target_os = "haiku",
target_os = "redox",
)))]
@@ -319,7 +329,7 @@ pub fn ftruncate<Fd: AsFd>(fd: Fd, length: u64) -> io::Result<()> {
/// - [Linux]
///
/// [Linux]: https://man7.org/linux/man-pages/man2/flock.2.html
-#[cfg(not(any(target_os = "solaris", target_os = "wasi")))]
+#[cfg(not(any(target_os = "espidf", target_os = "solaris", target_os = "wasi")))]
#[inline]
pub fn flock<Fd: AsFd>(fd: Fd, operation: FlockOperation) -> io::Result<()> {
backend::fs::syscalls::flock(fd.as_fd(), operation)