rust/library
Jacob Pratt ad42340e39
Rollup merge of #145746 - ivmarkov:fix-nofollow-espidf, r=ibraheemdev
Fix STD build failing for target_os = "espidf"

A regression from rust-lang/rust#142938

cc `@lolbinarycat`
cc `@ibraheemdev`

ESP-IDF (and a few other embedded Tier-3 systems) is considered `cfg(unix)`, but it does not have the `O_NOFOLLOW` flag because neither of its three supported filesystems (FATFS, LitteLF and Spiffs) has symbolic links in the first place.

What this fix does is to keep the `set_permissions_nofollow` method available and non-failing for ESP-IDF, but it behaves as if no `O_NONFOLLOW` was set. This should be fine as there is nothing to follow in the first place, as there are no symbolic links there.

EDIT: Also added the same fix for Horizon, as requested by `@Meziu.`
2025-08-27 21:51:53 -04:00
..