Skip to content

Commit

Permalink
Fix STD compilation for the ESP-IDF target
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Jan 21, 2022
1 parent 523be2e commit 495c7b3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions library/std/src/sys/unix/fs.rs
Expand Up @@ -1448,8 +1448,8 @@ pub fn chroot(dir: &Path) -> io::Result<()> {

pub use remove_dir_impl::remove_dir_all;

// Fallback for REDOX
#[cfg(target_os = "redox")]
// Fallback for REDOX and ESP-IDF
#[cfg(any(target_os = "redox", target_os = "espidf"))]
mod remove_dir_impl {
pub use crate::sys_common::fs::remove_dir_all;
}
Expand Down Expand Up @@ -1573,7 +1573,11 @@ mod remove_dir_impl {
}

// Modern implementation using openat(), unlinkat() and fdopendir()
#[cfg(not(any(all(target_os = "macos", target_arch = "x86_64"), target_os = "redox")))]
#[cfg(not(any(
all(target_os = "macos", target_arch = "x86_64"),
target_os = "redox",
target_os = "espidf"
)))]
mod remove_dir_impl {
use super::{cstr, lstat, Dir, DirEntry, InnerReadDir, ReadDir};
use crate::ffi::CStr;
Expand Down

0 comments on commit 495c7b3

Please sign in to comment.