about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/os.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index ca76be40cb5..1b61dec99b4 100644
--- a/src/libstd/os.rs
+++ b/src/libstd/os.rs
@@ -998,7 +998,7 @@ pub fn error_string(errnum: uint) -> String {
                 fail!("strerror_r failure");
             }
 
-            str::raw::from_c_str(p as *const c_char).into_string()
+            ::c_str::CString::new(p as *const c_char, false).as_str().unwrap().to_string()
         }
     }