about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-04-01 22:41:08 +0000
committerbors <bors@rust-lang.org>2015-04-01 22:41:08 +0000
commit2e3b0c051dca9880bf66b5366dccd2e0bb424b99 (patch)
tree2e8b8ea5a0daf51f819acaab9b9e2572459e2a60 /src/libstd/sys
parentd528aa9960cb9b937d8ef6c09905a6a8076d5f3a (diff)
parent0304e15e5c39654346e827c2bb25ca41ed310c86 (diff)
downloadrust-2e3b0c051dca9880bf66b5366dccd2e0bb424b99.tar.gz
rust-2e3b0c051dca9880bf66b5366dccd2e0bb424b99.zip
Auto merge of #23955 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/common/thread.rs3
-rw-r--r--src/libstd/sys/unix/os.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/sys/common/thread.rs b/src/libstd/sys/common/thread.rs
index f45daea18a2..1845b6266ed 100644
--- a/src/libstd/sys/common/thread.rs
+++ b/src/libstd/sys/common/thread.rs
@@ -25,6 +25,7 @@ pub fn start_thread(main: *mut libc::c_void) {
     unsafe {
         stack::record_os_managed_stack_bounds(0, usize::MAX);
         let _handler = stack_overflow::Handler::new();
-        Box::from_raw(main as *mut Thunk).invoke(());
+        let main: Box<Thunk> = Box::from_raw(main as *mut Thunk);
+        main();
     }
 }
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs
index 7b13e951b9b..d2220bdec32 100644
--- a/src/libstd/sys/unix/os.rs
+++ b/src/libstd/sys/unix/os.rs
@@ -409,7 +409,7 @@ pub fn env() -> Env {
     };
 
     fn parse(input: &[u8]) -> (OsString, OsString) {
-        let mut it = input.splitn(1, |b| *b == b'=');
+        let mut it = input.splitn(2, |b| *b == b'=');
         let key = it.next().unwrap().to_vec();
         let default: &[u8] = &[];
         let val = it.next().unwrap_or(default).to_vec();