Fix build warnings

This commit is contained in:
eric committed 2026-02-21 13:58:30 +08:00
1 parent 87fd7ed149
commit fde29e7641
2 files changed
+6 -2

No files matched your search

+5 -1
View File
@@ -1,3 +1,4 @@
#[cfg(any(target_os = "macos", target_os = "linux"))]
use std::ffi::CString;
use std::io;
use std::net::{IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4, SocketAddrV6};
@@ -16,7 +17,9 @@ use tokio::time::timeout;
use tracing::debug;
#[cfg(unix)]
use std::os::unix::io::{AsFd, AsRawFd};
use std::os::unix::io::AsFd;
#[cfg(any(target_os = "macos", target_os = "linux"))]
use std::os::unix::io::AsRawFd;
#[cfg(windows)]
use std::os::windows::io::{AsRawSocket, AsSocket};
#[cfg(target_os = "android")]
@@ -265,6 +268,7 @@ async fn bind_socket<T: BindSocket>(socket: &T, indicator: &SocketAddr) -> io::R
}
#[cfg(not(any(target_os = "macos", target_os = "linux")))]
{
let _ = iface;
return Err(io::Error::new(
io::ErrorKind::Other,
"binding to interface is not supported on this platform",
+1 -1
View File
@@ -32,7 +32,7 @@ cargo build -p $package $release_flag --no-default-features --features "default-
cargo build -p $package $release_flag --no-default-features --features "default-aws-lc" --target x86_64-apple-ios
cargo build -p $package $release_flag --no-default-features --features "default-ring" --target aarch64-apple-ios-sim
cargo install --force cbindgen
cargo install cbindgen
# Directories to put the libraries.
rm -rf target/apple/$mode