Skip to content

Conversation

ivmarkov
Copy link
Contributor

@ivmarkov ivmarkov commented Aug 22, 2025

A regression from #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.

@rustbot
Copy link
Collaborator

rustbot commented Aug 22, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 22, 2025
@ivmarkov
Copy link
Contributor Author

r? @ibraheemdev

@ivmarkov ivmarkov force-pushed the fix-nofollow-espidf branch from 06971ea to 8e5b591 Compare August 22, 2025 15:48
@ivmarkov
Copy link
Contributor Author

@ibraheemdev Would you have time to review, or shall I reassign to somebody else?

@ibraheemdev
Copy link
Member

Thanks for the quick fix. @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 27, 2025

📌 Commit 6e5a427 has been approved by ibraheemdev

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 27, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 28, 2025
…raheemdev

Fix STD build failing for target_os = "espidf"

A regression from rust-lang#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.`
bors added a commit that referenced this pull request Aug 28, 2025
Rollup of 5 pull requests

Successful merges:

 - #145382 (Add assembly test for `-Zreg-struct-return` option)
 - #145746 (Fix STD build failing for target_os = "espidf")
 - #145826 (Use AcceptContext in AttribueParser::check_target)
 - #145894 (Ensure the coordinator thread terminates before its channels drop)
 - #145946 (Remove unnecessary `[dependencies.unicode-properties]` entries.)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants