Skip to content

Commit 495c7b3

Browse files
committed
Fix STD compilation for the ESP-IDF target
1 parent 523be2e commit 495c7b3

File tree

1 file changed

+7
-3
lines changed
  • library/std/src/sys/unix

1 file changed

+7
-3
lines changed

library/std/src/sys/unix/fs.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,8 +1448,8 @@ pub fn chroot(dir: &Path) -> io::Result<()> {
14481448

14491449
pub use remove_dir_impl::remove_dir_all;
14501450

1451-
// Fallback for REDOX
1452-
#[cfg(target_os = "redox")]
1451+
// Fallback for REDOX and ESP-IDF
1452+
#[cfg(any(target_os = "redox", target_os = "espidf"))]
14531453
mod remove_dir_impl {
14541454
pub use crate::sys_common::fs::remove_dir_all;
14551455
}
@@ -1573,7 +1573,11 @@ mod remove_dir_impl {
15731573
}
15741574

15751575
// Modern implementation using openat(), unlinkat() and fdopendir()
1576-
#[cfg(not(any(all(target_os = "macos", target_arch = "x86_64"), target_os = "redox")))]
1576+
#[cfg(not(any(
1577+
all(target_os = "macos", target_arch = "x86_64"),
1578+
target_os = "redox",
1579+
target_os = "espidf"
1580+
)))]
15771581
mod remove_dir_impl {
15781582
use super::{cstr, lstat, Dir, DirEntry, InnerReadDir, ReadDir};
15791583
use crate::ffi::CStr;

0 commit comments

Comments
 (0)