diff options
| author | Raph Levien <raph@google.com> | 2017-02-22 09:28:02 -0800 |
|---|---|---|
| committer | Raph Levien <raph@google.com> | 2017-02-22 09:28:02 -0800 |
| commit | 81b9b3c542e0f3c3df799a9d66bb0120c7dbc44c (patch) | |
| tree | 90c1c85da170e1cbbad68fbe482e5f902717f183 /src/libstd/sys | |
| parent | 163698c45ff050a6a6e81f79d4f978d66fea8c9b (diff) | |
| download | rust-81b9b3c542e0f3c3df799a9d66bb0120c7dbc44c.tar.gz rust-81b9b3c542e0f3c3df799a9d66bb0120c7dbc44c.zip | |
Update name_bytes, scoop up latest libc
Update the implementation of name_bytes to use the owned string (which is thread safe). Also bump the src/liblibc submodule now that's merged.
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/fs.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 9c16e5b6e67..d0fb96b1ff1 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -345,14 +345,14 @@ impl DirEntry { #[cfg(any(target_os = "android", target_os = "linux", target_os = "emscripten", - target_os = "haiku", - target_os = "fuchsia"))] + target_os = "haiku"))] fn name_bytes(&self) -> &[u8] { unsafe { CStr::from_ptr(self.entry.d_name.as_ptr()).to_bytes() } } - #[cfg(target_os = "solaris")] + #[cfg(any(target_os = "solaris", + target_os = "fuchsia"))] fn name_bytes(&self) -> &[u8] { &*self.name } |
