]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/io/test.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / libstd / io / test.rs
index 079a9aef648aa77e7480eaf57bbfbe1d80c7959d..cfc5fb982b86c0b8a6bed372f3626a730dac2491 100644 (file)
@@ -34,7 +34,7 @@ mod $name {
             use io::net::ip::*;
             use io::net::udp::*;
             #[cfg(unix)]
-            use io::net::unix::*;
+            use io::net::pipe::*;
             use io::timer::*;
             use io::process::*;
             use rt::running_on_valgrind;
@@ -146,6 +146,7 @@ mod darwin_fd_limit {
 
     use libc;
     type rlim_t = libc::uint64_t;
+    #[repr(C)]
     struct rlimit {
         rlim_cur: rlim_t,
         rlim_max: rlim_t
@@ -165,7 +166,7 @@ fn sysctl(name: *mut libc::c_int, namelen: libc::c_uint,
     pub unsafe fn raise_fd_limit() {
         // The strategy here is to fetch the current resource limits, read the kern.maxfilesperproc
         // sysctl value, and bump the soft resource limit for maxfiles up to the sysctl value.
-        use ptr::mut_null;
+        use ptr::null_mut;
         use mem::size_of_val;
         use os::last_os_error;
 
@@ -174,7 +175,7 @@ pub unsafe fn raise_fd_limit() {
         let mut maxfiles: libc::c_int = 0;
         let mut size: libc::size_t = size_of_val(&maxfiles) as libc::size_t;
         if sysctl(&mut mib[0], 2, &mut maxfiles as *mut libc::c_int as *mut libc::c_void, &mut size,
-                  mut_null(), 0) != 0 {
+                  null_mut(), 0) != 0 {
             let err = last_os_error();
             fail!("raise_fd_limit: error calling sysctl: {}", err);
         }