From 09ecc7e521bd3003a4449fb8e234c3525ec81dee Mon Sep 17 00:00:00 2001 From: "D.K" Date: Thu, 2 Oct 2014 14:42:28 -0400 Subject: [PATCH] Changes made to support 0.12.0-dev ( October 2, 2014 ) --- src/ffi.rs | 6 ++---- src/ssl/mod.rs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ffi.rs b/src/ffi.rs index 7bfaf25d..63a13335 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -171,14 +171,12 @@ pub static X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: c_int = 45; pub static X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: c_int = 53; pub static X509_V_OK: c_int = 0; -#[cfg(target_os = "macos", feature = "tlsv1_1")] -#[cfg(target_os = "macos", feature = "tlsv1_2")] +#[cfg( any( all(target_os = "macos", feature = "tlsv1_1"),all(target_os = "macos", feature = "tlsv1_2")))] #[link(name="ssl.1.0.0")] #[link(name="crypto.1.0.0")] extern {} -#[cfg(not(target_os = "macos"))] -#[cfg(target_os = "macos", not(feature = "tlsv1_1"), not(feature = "tlsv1_2"))] +#[cfg(any( not( target_os = "macos"), all(target_os = "macos", not(feature = "tlsv1_1"), not(feature = "tlsv1_2"))))] #[link(name="ssl")] #[link(name="crypto")] extern {} diff --git a/src/ssl/mod.rs b/src/ssl/mod.rs index ab467f7e..379a98cf 100644 --- a/src/ssl/mod.rs +++ b/src/ssl/mod.rs @@ -494,7 +494,7 @@ impl Writer for SslStream { let mut start = 0; while start < buf.len() { let ret = self.in_retry_wrapper(|ssl| { - ssl.write(buf.slice_from(start)) + ssl.write(buf.split_at(start).val1()) }); match ret { Ok(len) => start += len as uint,