From 81b9b3c542e0f3c3df799a9d66bb0120c7dbc44c Mon Sep 17 00:00:00 2001 From: Raph Levien Date: Wed, 22 Feb 2017 09:28:02 -0800 Subject: 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. --- src/libstd/sys/unix/fs.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/sys') 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 } -- cgit 1.4.1-3-g733a5