diff --git a/crypto/hash.rs b/crypto/hash.rs index 60a98e98..ed617be6 100644 --- a/crypto/hash.rs +++ b/crypto/hash.rs @@ -1,5 +1,5 @@ -use std::libc::c_uint; -use std::libc; +use libc; +use libc::c_uint; use std::ptr; use std::slice; diff --git a/crypto/hmac.rs b/crypto/hmac.rs index 17993bfe..b66180fc 100644 --- a/crypto/hmac.rs +++ b/crypto/hmac.rs @@ -14,7 +14,7 @@ * limitations under the License. */ -use std::libc::{c_uchar, c_int, c_uint}; +use libc::{c_uchar, c_int, c_uint}; use std::ptr; use std::slice; use crypto::hash; diff --git a/crypto/pkcs5.rs b/crypto/pkcs5.rs index d50666a1..2d1bfd34 100644 --- a/crypto/pkcs5.rs +++ b/crypto/pkcs5.rs @@ -1,4 +1,4 @@ -use std::libc::c_int; +use libc::c_int; use std::slice; #[link(name = "crypto")] diff --git a/crypto/pkey.rs b/crypto/pkey.rs index abe764dd..0058e6d0 100644 --- a/crypto/pkey.rs +++ b/crypto/pkey.rs @@ -1,6 +1,6 @@ use std::cast; -use std::libc::{c_char, c_int, c_uint}; -use std::libc; +use libc::{c_char, c_int, c_uint}; +use libc; use std::ptr; use std::slice; use crypto::hash::{HashType, MD5, SHA1, SHA224, SHA256, SHA384, SHA512}; diff --git a/crypto/rand.rs b/crypto/rand.rs index 9d1744a2..2ae001ef 100644 --- a/crypto/rand.rs +++ b/crypto/rand.rs @@ -1,4 +1,4 @@ -use std::libc::c_int; +use libc::c_int; use std::slice; #[link(name = "crypto")] diff --git a/crypto/symm.rs b/crypto/symm.rs index 008f777a..d648d7c4 100644 --- a/crypto/symm.rs +++ b/crypto/symm.rs @@ -1,5 +1,5 @@ -use std::libc::{c_int, c_uint}; -use std::libc; +use libc::{c_int, c_uint}; +use libc; use std::slice; #[allow(non_camel_case_types)] diff --git a/lib.rs b/lib.rs index 5f854761..840d439c 100644 --- a/lib.rs +++ b/lib.rs @@ -4,6 +4,7 @@ #![crate_type="dylib"] #![doc(html_root_url="http://www.rust-ci.org/sfackler/rust-openssl/doc")] +extern crate libc; #[cfg(test)] extern crate serialize; extern crate sync; diff --git a/ssl/error.rs b/ssl/error.rs index 9cd58a2d..dd387e2f 100644 --- a/ssl/error.rs +++ b/ssl/error.rs @@ -1,4 +1,4 @@ -use std::libc::c_ulong; +use libc::c_ulong; use std::io::IoError; use ssl::ffi; diff --git a/ssl/ffi.rs b/ssl/ffi.rs index 172a25a2..819fb63d 100644 --- a/ssl/ffi.rs +++ b/ssl/ffi.rs @@ -1,6 +1,6 @@ #![allow(non_camel_case_types)] -use std::libc::{c_int, c_void, c_long, c_ulong, c_char}; +use libc::{c_int, c_void, c_long, c_ulong, c_char}; pub type SSL_CTX = c_void; pub type SSL_METHOD = c_void; diff --git a/ssl/mod.rs b/ssl/mod.rs index ef800474..b43289eb 100644 --- a/ssl/mod.rs +++ b/ssl/mod.rs @@ -1,6 +1,6 @@ use sync::one::{Once, ONCE_INIT}; use std::cast; -use std::libc::{c_int, c_void, c_char}; +use libc::{c_int, c_void, c_char}; use std::ptr; use std::io::{IoResult, IoError, EndOfFile, Stream, Reader, Writer}; use std::unstable::mutex::NativeMutex;