From d414b7091bbfbc0a85dc231c511661a58ed64745 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 6 Aug 2016 17:31:06 -0700 Subject: Bump to 0.2.13 --- src/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 0f64d5f..cf05eb5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -166,10 +166,20 @@ mod util; pub fn init() { static INIT: Once = ONCE_INIT; INIT.call_once(|| unsafe { - assert_eq!(raw::libssh2_init(0), 0); + platform_init(); + assert_eq!(raw::libssh2_init(raw::LIBSSH2_INIT_NO_CRYPTO), 0); assert_eq!(libc::atexit(shutdown), 0); }); extern fn shutdown() { unsafe { raw::libssh2_exit(); } } + + #[cfg(unix)] + fn platform_init() { + extern crate openssl_sys; + openssl_sys::init(); + } + + #[cfg(windows)] + fn platform_init() {} } unsafe fn opt_bytes<'a, T>(_: &'a T, -- cgit v1.2.3