Re-add no-mangle to usbmuxd ffi function

This commit is contained in:
Jackson Coxson
2025-08-12 12:03:55 -06:00
parent 873505b9db
commit 388b50246a
2 changed files with 2 additions and 1 deletions

View File

@@ -191,7 +191,7 @@ class UsbmuxdConnection {
/// @param err An error that will be populated on failure. /// @param err An error that will be populated on failure.
/// @return A UsbmuxdConnection on success, std::nullopt on failure. /// @return A UsbmuxdConnection on success, std::nullopt on failure.
static std::optional<UsbmuxdConnection> static std::optional<UsbmuxdConnection>
tcp_new(const sockaddr* addr, socklen_t addr_len, uint32_t tag, FfiError& err) { tcp_new(const idevice_sockaddr* addr, idevice_socklen_t addr_len, uint32_t tag, FfiError& err) {
UsbmuxdConnectionHandle* handle = nullptr; UsbmuxdConnectionHandle* handle = nullptr;
IdeviceFfiError* e = idevice_usbmuxd_new_tcp_connection(addr, addr_len, tag, &handle); IdeviceFfiError* e = idevice_usbmuxd_new_tcp_connection(addr, addr_len, tag, &handle);
if (e) { if (e) {

View File

@@ -33,6 +33,7 @@ pub struct UsbmuxdDeviceHandle(pub UsbmuxdDevice);
/// # Safety /// # Safety
/// `addr` must be a valid sockaddr /// `addr` must be a valid sockaddr
/// `usbmuxd_connection` must be a valid, non-null pointer to a location where the handle will be stored /// `usbmuxd_connection` must be a valid, non-null pointer to a location where the handle will be stored
#[unsafe(no_mangle)]
pub unsafe extern "C" fn idevice_usbmuxd_new_tcp_connection( pub unsafe extern "C" fn idevice_usbmuxd_new_tcp_connection(
addr: *const idevice_sockaddr, addr: *const idevice_sockaddr,
addr_len: idevice_socklen_t, addr_len: idevice_socklen_t,