Finish up preliminary tvos support in libstd
This commit is contained in:
parent
bdc3db944c
commit
f978d7ea42
5 changed files with 31 additions and 8 deletions
|
|
@ -283,7 +283,13 @@ impl Drop for Thread {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "macos", target_os = "ios", target_os = "watchos"))]
|
||||
#[cfg(any(
|
||||
target_os = "linux",
|
||||
target_os = "macos",
|
||||
target_os = "ios",
|
||||
target_os = "tvos",
|
||||
target_os = "watchos",
|
||||
))]
|
||||
fn truncate_cstr<const MAX_WITH_NUL: usize>(cstr: &CStr) -> [libc::c_char; MAX_WITH_NUL] {
|
||||
let mut result = [0; MAX_WITH_NUL];
|
||||
for (src, dst) in cstr.to_bytes().iter().zip(&mut result[..MAX_WITH_NUL - 1]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue