diff options
author | Alex Crichton <alex@alexcrichton.com> | 2015-03-19 09:27:33 -0700 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-19 09:27:33 -0700 |
commit | 86da5b3f85b3ab2bf86d53b07451b8e6eb823a49 (patch) | |
tree | 35a76ec072ed021e06f6f28bac85d20f83282c08 | |
parent | e9fd4baa53e9b2f18c7627716644c5e5a930a368 (diff) | |
download | ssh2-rs-86da5b3f85b3ab2bf86d53b07451b8e6eb823a49.zip |
Use new metadata format for Cargo
-rw-r--r-- | libssh2-sys/build.rs | 7 | ||||
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/session.rs | 4 | ||||
-rw-r--r-- | tests/all.rs | 2 | ||||
-rw-r--r-- | tests/channel.rs | 2 |
5 files changed, 10 insertions, 7 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs index 27cd493..703199c 100644 --- a/libssh2-sys/build.rs +++ b/libssh2-sys/build.rs @@ -104,9 +104,12 @@ fn main() { } if windows { - println!("cargo:rustc-flags=-l ws2_32 -l bcrypt -l crypt32"); + println!("cargo:rustc-link-lib=ws2_32"); + println!("cargo:rustc-link-lib=bcrypt"); + println!("cargo:rustc-link-lib=crypt32"); } - println!("cargo:rustc-flags=-L {}/lib -l ssh2:static", dst.display()); + println!("cargo:rustc-link-search=native={}/lib", dst.display()); + println!("cargo:rustc-link-lib=static=ssh2"); println!("cargo:root={}", dst.display()); println!("cargo:include={}/include", dst.display()); } @@ -124,7 +124,7 @@ //! ``` #![doc(html_root_url = "http://alexcrichton.com/ssh2-rs")] -#![feature(unsafe_destructor, std_misc, collections, io, core, net)] +#![feature(unsafe_destructor, std_misc, collections, io, core, io_ext)] #![deny(missing_docs, unused_results)] #![cfg_attr(test, deny(warnings))] diff --git a/src/session.rs b/src/session.rs index 8048b74..30ac664 100644 --- a/src/session.rs +++ b/src/session.rs @@ -143,14 +143,14 @@ impl Session { #[cfg(windows)] unsafe fn handshake(raw: *mut raw::LIBSSH2_SESSION, stream: &TcpStream) -> libc::c_int { - use std::os::windows::AsRawSocket; + use std::os::windows::prelude::*; raw::libssh2_session_handshake(raw, stream.as_raw_socket()) } #[cfg(unix)] unsafe fn handshake(raw: *mut raw::LIBSSH2_SESSION, stream: &TcpStream) -> libc::c_int { - use std::os::unix::AsRawFd; + use std::os::unix::prelude::*; raw::libssh2_session_handshake(raw, stream.as_raw_fd()) } } diff --git a/tests/all.rs b/tests/all.rs index 1cde6e2..74c38b1 100644 --- a/tests/all.rs +++ b/tests/all.rs @@ -1,5 +1,5 @@ #![deny(warnings)] -#![feature(io, core, net)] +#![feature(core)] extern crate ssh2; extern crate libc; diff --git a/tests/channel.rs b/tests/channel.rs index 38a39aa..128e425 100644 --- a/tests/channel.rs +++ b/tests/channel.rs @@ -69,7 +69,7 @@ fn setenv() { #[test] fn direct() { let a = TcpListener::bind("127.0.0.1:0").unwrap(); - let addr = a.socket_addr().unwrap(); + let addr = a.local_addr().unwrap(); let t = thread::scoped(move|| { let mut s = a.accept().unwrap().0; let b = &mut [0, 0, 0]; |