about summary refs log tree commit diff
path: root/src/libstd/sys/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sys/common')
-rw-r--r--src/libstd/sys/common/net.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs
index 1a0ee17904a..fc21effb45a 100644
--- a/src/libstd/sys/common/net.rs
+++ b/src/libstd/sys/common/net.rs
@@ -115,9 +115,9 @@ pub fn socket(addr: SocketAddr, ty: libc::c_int) -> IoResult<sock_t> {
             Ipv4Addr(..) => libc::AF_INET,
             Ipv6Addr(..) => libc::AF_INET6,
         };
-        match libc::socket(fam, ty, 0) {
+        match libc::socket(fam, ty, 0) as i32 {
             -1 => Err(last_net_error()),
-            fd => Ok(fd),
+            fd => Ok(fd as sock_t),
         }
     }
 }