diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-04-01 18:44:53 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-04-02 00:18:45 -0700 |
| commit | e3b7e6caa25bffcffe6b04f550f551e1ae086f6b (patch) | |
| tree | 460e4d59504435411421cf261c5735a726f16942 /src/libstd/sys/windows | |
| parent | fb77443213d3be1e0c937b6f9e114e0c8c5b2bb5 (diff) | |
| download | rust-e3b7e6caa25bffcffe6b04f550f551e1ae086f6b.tar.gz rust-e3b7e6caa25bffcffe6b04f550f551e1ae086f6b.zip | |
Tweak relese notes + rebase fixes
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/c.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sys/windows/tcp.rs | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs index 99abe10c8a4..4804f650441 100644 --- a/src/libstd/sys/windows/c.rs +++ b/src/libstd/sys/windows/c.rs @@ -89,7 +89,6 @@ pub type LPWSANETWORKEVENTS = *mut WSANETWORKEVENTS; pub type WSAEVENT = libc::HANDLE; #[repr(C)] -#[derive(Copy)] pub struct WSAPROTOCOL_INFO { pub dwServiceFlags1: libc::DWORD, pub dwServiceFlags2: libc::DWORD, diff --git a/src/libstd/sys/windows/tcp.rs b/src/libstd/sys/windows/tcp.rs index 2ac8ac10aa9..41e97dc8475 100644 --- a/src/libstd/sys/windows/tcp.rs +++ b/src/libstd/sys/windows/tcp.rs @@ -15,6 +15,7 @@ use prelude::v1::*; use old_io::net::ip; use old_io::IoResult; use libc; +use libc::consts::os::extra::INVALID_SOCKET; use mem; use ptr; use super::{last_error, last_net_error, sock_t}; @@ -183,8 +184,8 @@ impl TcpAcceptor { match unsafe { libc::accept(self.socket(), ptr::null_mut(), ptr::null_mut()) } { - -1 if wouldblock() => {} - -1 => return Err(last_net_error()), + INVALID_SOCKET if wouldblock() => {} + INVALID_SOCKET => return Err(last_net_error()), // Accepted sockets inherit the same properties as the caller, // so we need to deregister our event and switch the socket back |
