diff options
Diffstat (limited to 'library/std/src/os/unix/net')
| -rw-r--r-- | library/std/src/os/unix/net/addr.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/unix/net/ancillary.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/unix/net/datagram.rs | 4 | ||||
| -rw-r--r-- | library/std/src/os/unix/net/listener.rs | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/library/std/src/os/unix/net/addr.rs b/library/std/src/os/unix/net/addr.rs index 9757653e02c..7b451fec329 100644 --- a/library/std/src/os/unix/net/addr.rs +++ b/library/std/src/os/unix/net/addr.rs @@ -11,7 +11,7 @@ use crate::{fmt, io, mem, ptr}; #[cfg(not(unix))] #[allow(non_camel_case_types)] mod libc { - pub use libc::c_int; + pub use core::ffi::c_int; pub type socklen_t = u32; pub struct sockaddr; #[derive(Clone)] diff --git a/library/std/src/os/unix/net/ancillary.rs b/library/std/src/os/unix/net/ancillary.rs index 1d279d6adbc..0597fdcbd72 100644 --- a/library/std/src/os/unix/net/ancillary.rs +++ b/library/std/src/os/unix/net/ancillary.rs @@ -20,7 +20,7 @@ use crate::sys::net::Socket; ))] #[allow(non_camel_case_types)] mod libc { - pub use libc::c_int; + pub use core::ffi::c_int; pub struct ucred; pub struct cmsghdr; pub struct sockcred2; diff --git a/library/std/src/os/unix/net/datagram.rs b/library/std/src/os/unix/net/datagram.rs index df698c17f6c..b29f9099a11 100644 --- a/library/std/src/os/unix/net/datagram.rs +++ b/library/std/src/os/unix/net/datagram.rs @@ -34,7 +34,7 @@ use libc::MSG_NOSIGNAL; target_os = "haiku", target_os = "nto", )))] -const MSG_NOSIGNAL: libc::c_int = 0x0; +const MSG_NOSIGNAL: core::ffi::c_int = 0x0; /// A Unix datagram socket. /// @@ -317,7 +317,7 @@ impl UnixDatagram { fn recv_from_flags( &self, buf: &mut [u8], - flags: libc::c_int, + flags: core::ffi::c_int, ) -> io::Result<(usize, SocketAddr)> { let mut count = 0; let addr = SocketAddr::new(|addr, len| unsafe { diff --git a/library/std/src/os/unix/net/listener.rs b/library/std/src/os/unix/net/listener.rs index 31286a906ea..7e53acbc387 100644 --- a/library/std/src/os/unix/net/listener.rs +++ b/library/std/src/os/unix/net/listener.rs @@ -79,14 +79,14 @@ impl UnixListener { target_os = "espidf", target_os = "horizon" ))] - const backlog: libc::c_int = 128; + const backlog: core::ffi::c_int = 128; #[cfg(any( target_os = "linux", target_os = "freebsd", target_os = "openbsd", target_os = "macos" ))] - const backlog: libc::c_int = -1; + const backlog: core::ffi::c_int = -1; #[cfg(not(any( target_os = "windows", target_os = "redox", @@ -138,9 +138,9 @@ impl UnixListener { unsafe { let inner = Socket::new_raw(libc::AF_UNIX, libc::SOCK_STREAM)?; #[cfg(target_os = "linux")] - const backlog: libc::c_int = -1; + const backlog: core::ffi::c_int = -1; #[cfg(not(target_os = "linux"))] - const backlog: libc::c_int = 128; + const backlog: core::ffi::c_int = 128; cvt(libc::bind( inner.as_raw_fd(), core::ptr::addr_of!(socket_addr.addr) as *const _, |
