From 5bf2ae81a5e49f04eb3549c01d05abec76117636 Mon Sep 17 00:00:00 2001 From: Lars Bergstrom Date: Thu, 14 Jan 2016 14:56:09 -0600 Subject: [PATCH] Workaround to land the rustup while we wait for rust-errno --- components/servo/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/servo/lib.rs b/components/servo/lib.rs index 7289cdbcdd6..1dc17b0c4e3 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -252,3 +252,12 @@ pub fn run_content_process(token: String) { script::script_thread::ScriptThread>(true); } +// This is a workaround for https://github.com/rust-lang/rust/pull/30175 until +// https://github.com/lfairy/rust-errno/pull/5 lands, and should be removed once +// we update Servo with the rust-errno crate. +#[cfg(target_os = "android")] +#[no_mangle] +pub unsafe extern fn __errno_location() -> *mut i32 { + extern { fn __errno() -> *mut i32; } + __errno() +}