Skip to content

Commit f35b84d

Browse files
committed
Remove libc from public API
1 parent 4c1cf6b commit f35b84d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ all = []
6969

7070
[package.metadata.cargo_check_external_types]
7171
allowed_external_types = [
72-
"libc::*",
7372
# Referenced via a type alias.
73+
"libc::socklen_t",
74+
"libc::unix::bsd::socklen_t", # libc::socklen_t isn't always detected.
75+
"libc::sa_family_t",
76+
"libc::unix::bsd::sa_family_t", # libc::sa_family_t is always detected.
7477
"windows_sys::Win32::Networking::WinSock::socklen_t",
7578
"windows_sys::Win32::Networking::WinSock::ADDRESS_FAMILY",
7679
]

src/sys/unix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ use crate::{Domain, Protocol, SockAddr, SockAddrStorage, TcpKeepalive, Type};
8383
#[cfg(not(target_os = "redox"))]
8484
use crate::{MsgHdr, MsgHdrMut, RecvFlags};
8585

86-
pub(crate) use libc::c_int;
86+
pub(crate) use std::ffi::c_int;
8787

8888
// Used in `Domain`.
8989
pub(crate) use libc::{AF_INET, AF_INET6, AF_UNIX};

0 commit comments

Comments
 (0)