diff options
| author | Yuri Astrakhan <YuriAstrakhan@gmail.com> | 2024-09-11 17:35:14 -0400 |
|---|---|---|
| committer | Yuri Astrakhan <YuriAstrakhan@gmail.com> | 2024-09-11 17:35:14 -0400 |
| commit | 368231c9954f2a672ba5e484b2de3aee36d911cc (patch) | |
| tree | ed247d210fcf4705b37697fb317a8f6f8573ce42 /library/std/src/sys | |
| parent | f7f8bdf2e03918cc3742db3bb37b7cfe9994dbec (diff) | |
| download | rust-368231c9954f2a672ba5e484b2de3aee36d911cc.tar.gz rust-368231c9954f2a672ba5e484b2de3aee36d911cc.zip | |
Limit `libc::link` usage to `nto70` target only, not NTO OS
It seems QNX 7.0 does not support `linkat` at all (most tests were failing). Limiting to QNX 7.0 only, while using `linkat` for the future versions seems like the right path forward (tested on 7.0). Fixes 129895
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/pal/unix/fs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/pal/unix/fs.rs b/library/std/src/sys/pal/unix/fs.rs index 4ec577a0a01..d09cee2e89c 100644 --- a/library/std/src/sys/pal/unix/fs.rs +++ b/library/std/src/sys/pal/unix/fs.rs @@ -1731,7 +1731,7 @@ pub fn link(original: &Path, link: &Path) -> io::Result<()> { run_path_with_cstr(original, &|original| { run_path_with_cstr(link, &|link| { cfg_if::cfg_if! { - if #[cfg(any(target_os = "vxworks", target_os = "redox", target_os = "android", target_os = "espidf", target_os = "horizon", target_os = "vita", target_os = "nto"))] { + if #[cfg(any(target_os = "vxworks", target_os = "redox", target_os = "android", target_os = "espidf", target_os = "horizon", target_os = "vita", target_env = "nto70"))] { // VxWorks, Redox and ESP-IDF lack `linkat`, so use `link` instead. POSIX leaves // it implementation-defined whether `link` follows symlinks, so rely on the // `symlink_hard_link` test in library/std/src/fs/tests.rs to check the behavior. |
