aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard Diamond <[email protected]>2014-11-09 23:07:59 -0600
committerRichard Diamond <[email protected]>2014-11-09 23:07:59 -0600
commit019e47020a52c0e4409739837ef653f7837f2e1c (patch)
tree3d02d332142d3011720c3ef58b7abf6a666c6a3a /src
parentAdd overrideable platform ssl. (diff)
downloadrust-openssl-019e47020a52c0e4409739837ef653f7837f2e1c.tar.xz
rust-openssl-019e47020a52c0e4409739837ef653f7837f2e1c.zip
Support PNaCl/NaCl.
Diffstat (limited to 'src')
-rw-r--r--src/ffi.rs34
1 files changed, 20 insertions, 14 deletions
diff --git a/src/ffi.rs b/src/ffi.rs
index e661d205..e67f444d 100644
--- a/src/ffi.rs
+++ b/src/ffi.rs
@@ -176,20 +176,26 @@ pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: c_int = 45;
pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: c_int = 53;
pub const X509_V_OK: c_int = 0;
-#[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(any( not( target_os = "macos"), all(target_os = "macos", not(feature = "tlsv1_1"), not(feature = "tlsv1_2"))))]
-#[link(name="ssl")]
-#[link(name="crypto")]
-extern {}
-
-#[cfg(target_os = "win32")]
-#[link(name="gdi32")]
-#[link(name="wsock32")]
-extern { }
+#[cfg(not(target_os = "nacl"))]
+mod link {
+ #[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(any( not( target_os = "macos"),
+ all(target_os = "macos", not(feature = "tlsv1_1"),
+ not(feature = "tlsv1_2"))))]
+ #[link(name="ssl")]
+ #[link(name="crypto")]
+ extern {}
+
+ #[cfg(target_os = "win32")]
+ #[link(name="gdi32")]
+ #[link(name="wsock32")]
+ extern { }
+}
static mut MUTEXES: *mut Vec<NativeMutex> = 0 as *mut Vec<NativeMutex>;