diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2022-11-10 10:06:34 +0000 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2023-03-28 16:01:13 +0100 |
| commit | e3968be331aaf7fa48f2365998ed4d076ddc82c8 (patch) | |
| tree | 78f50787f6df1fb7dbcf3009a3fdd25f8f49dbc6 /library/std/src/sys/unix/os.rs | |
| parent | dd19135b044cd21a9c3ae7ae87620bf41a208066 (diff) | |
| download | rust-e3968be331aaf7fa48f2365998ed4d076ddc82c8.tar.gz rust-e3968be331aaf7fa48f2365998ed4d076ddc82c8.zip | |
Add OpenHarmony targets
- `aarch64-unknown-linux-ohos` - `armv7-unknown-linux-ohos`
Diffstat (limited to 'library/std/src/sys/unix/os.rs')
| -rw-r--r-- | library/std/src/sys/unix/os.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/library/std/src/sys/unix/os.rs b/library/std/src/sys/unix/os.rs index 21b035fb373..1c44058aff7 100644 --- a/library/std/src/sys/unix/os.rs +++ b/library/std/src/sys/unix/os.rs @@ -115,7 +115,10 @@ pub fn set_errno(e: i32) { /// Gets a detailed string description for the given error number. pub fn error_string(errno: i32) -> String { extern "C" { - #[cfg_attr(any(target_os = "linux", target_env = "newlib"), link_name = "__xpg_strerror_r")] + #[cfg_attr( + all(any(target_os = "linux", target_env = "newlib"), not(target_env = "ohos")), + link_name = "__xpg_strerror_r" + )] fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: libc::size_t) -> c_int; } |
