Skip to content

Commit bc1d8c0

Browse files
committed
Use more types from windows_sys crate
1 parent 81d75df commit bc1d8c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sys/windows.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use windows_sys::Win32::System::Threading::INFINITE;
3131
use crate::{RecvFlags, SockAddr, TcpKeepalive, Type};
3232

3333
#[allow(non_camel_case_types)]
34-
pub(crate) type c_int = i32;
34+
pub(crate) type c_int = std::os::raw::c_int;
3535

3636
/// Fake MSG_TRUNC flag for the [`RecvFlags`] struct.
3737
///
@@ -61,9 +61,9 @@ pub(crate) use windows_sys::Win32::Networking::WinSock::{
6161
SOCKADDR_STORAGE as sockaddr_storage,
6262
};
6363
#[allow(non_camel_case_types)]
64-
pub(crate) type sa_family_t = u16;
64+
pub(crate) type sa_family_t = windows_sys::Win32::Networking::WinSock::sa_family_t;
6565
#[allow(non_camel_case_types)]
66-
pub(crate) type socklen_t = i32;
66+
pub(crate) type socklen_t = windows_sys::Win32::Networking::WinSock::socklen_t;
6767
// Used in `Socket`.
6868
#[cfg(feature = "all")]
6969
pub(crate) use windows_sys::Win32::Networking::WinSock::IP_HDRINCL;
@@ -110,7 +110,7 @@ impl_debug!(
110110
self::AF_INET,
111111
self::AF_INET6,
112112
self::AF_UNIX,
113-
self::AF_UNSPEC, // = 0.
113+
self::AF_UNSPEC,
114114
);
115115

116116
/// Windows only API.

0 commit comments

Comments
 (0)