about summary refs log tree commit diff
path: root/library/std/src/sys_common
diff options
context:
space:
mode:
authorAyush Singh <ayushsingh1325@gmail.com>2022-12-10 13:34:19 +0530
committerAyush Singh <ayushsingh1325@gmail.com>2023-01-28 11:24:13 +0530
commitc50d3e28ab0bfaedd1f0f90a376e6f93e4e83c62 (patch)
tree7d6f026aa9fd2263f296d5fb6b744229fa769c51 /library/std/src/sys_common
parent6cd6bad51fb34a0d89e97c27814041fe4d0838b5 (diff)
downloadrust-c50d3e28ab0bfaedd1f0f90a376e6f93e4e83c62.tar.gz
rust-c50d3e28ab0bfaedd1f0f90a376e6f93e4e83c62.zip
Replace libc::{type} with crate::ffi::{type}
Replace libc::{type} imports with crate::ffi::{type} outside of
`std::sys` and `std::os`.

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
Diffstat (limited to 'library/std/src/sys_common')
-rw-r--r--library/std/src/sys_common/net.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/sys_common/net.rs b/library/std/src/sys_common/net.rs
index fad4a63331b..2c38dfecf97 100644
--- a/library/std/src/sys_common/net.rs
+++ b/library/std/src/sys_common/net.rs
@@ -14,7 +14,7 @@ use crate::sys::net::{cvt, cvt_gai, cvt_r, init, wrlen_t, Socket};
 use crate::sys_common::{AsInner, FromInner, IntoInner};
 use crate::time::Duration;
 
-use libc::{c_int, c_void};
+use crate::ffi::{c_int, c_void};
 
 cfg_if::cfg_if! {
     if #[cfg(any(
@@ -47,7 +47,7 @@ cfg_if::cfg_if! {
         target_os = "dragonfly", target_os = "freebsd",
         target_os = "openbsd", target_os = "netbsd",
         target_os = "solaris", target_os = "illumos"))] {
-        use libc::c_uchar;
+        use crate::ffi::c_uchar;
         type IpV4MultiCastType = c_uchar;
     } else {
         type IpV4MultiCastType = c_int;
@@ -127,8 +127,8 @@ fn to_ipv6mr_interface(value: u32) -> c_int {
 }
 
 #[cfg(not(target_os = "android"))]
-fn to_ipv6mr_interface(value: u32) -> libc::c_uint {
-    value as libc::c_uint
+fn to_ipv6mr_interface(value: u32) -> crate::ffi::c_uint {
+    value as crate::ffi::c_uint
 }
 
 ////////////////////////////////////////////////////////////////////////////////