Use crate util types in FFI lib.rs

This commit is contained in:
Jackson Coxson
2025-08-12 11:41:12 -06:00
parent 618500fd0c
commit 873505b9db

View File

@@ -54,6 +54,9 @@ use std::{
};
use tokio::runtime::{self, Runtime};
#[cfg(unix)]
use crate::util::{idevice_sockaddr, idevice_socklen_t};
static RUNTIME: Lazy<Runtime> = Lazy::new(|| {
runtime::Builder::new_multi_thread()
.enable_io()
@@ -144,6 +147,8 @@ pub unsafe extern "C" fn idevice_new_tcp_socket(
label: *const c_char,
idevice: *mut *mut IdeviceHandle,
) -> *mut IdeviceFfiError {
use crate::util::SockAddr;
if addr.is_null() || label.is_null() || idevice.is_null() {
log::error!("null pointer(s) to idevice_new_tcp_socket");
return ffi_err!(IdeviceError::FfiInvalidArg);