Skip to content

Commit ef9479c

Browse files
committed
Add socklen_t type alias
1 parent 6ebb23c commit ef9479c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/sockaddr.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ use std::{fmt, io, ptr};
88
use windows_sys::Win32::Networking::WinSock::SOCKADDR_IN6_0;
99

1010
use crate::sys::{
11-
c_int, sa_family_t, sockaddr, sockaddr_in, sockaddr_in6, sockaddr_storage, socklen_t, AF_INET,
12-
AF_INET6, AF_UNIX,
11+
c_int, sa_family_t, sockaddr, sockaddr_in, sockaddr_in6, sockaddr_storage, AF_INET, AF_INET6,
12+
AF_UNIX,
1313
};
1414
use crate::Domain;
1515

16+
/// The integer type used with `getsockname` on this platform.
17+
#[allow(non_camel_case_types)]
18+
pub type socklen_t = crate::sys::socklen_t;
19+
1620
/// The address of a socket.
1721
///
1822
/// `SockAddr`s may be constructed directly to and from the standard library

0 commit comments

Comments
 (0)