diff --git a/cpp/include/usbmuxd.hpp b/cpp/include/usbmuxd.hpp index 07b0889..fe33aad 100644 --- a/cpp/include/usbmuxd.hpp +++ b/cpp/include/usbmuxd.hpp @@ -191,7 +191,7 @@ class UsbmuxdConnection { /// @param err An error that will be populated on failure. /// @return A UsbmuxdConnection on success, std::nullopt on failure. static std::optional - 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; IdeviceFfiError* e = idevice_usbmuxd_new_tcp_connection(addr, addr_len, tag, &handle); if (e) { diff --git a/ffi/src/usbmuxd.rs b/ffi/src/usbmuxd.rs index 56da89e..fcccd94 100644 --- a/ffi/src/usbmuxd.rs +++ b/ffi/src/usbmuxd.rs @@ -33,6 +33,7 @@ pub struct UsbmuxdDeviceHandle(pub UsbmuxdDevice); /// # Safety /// `addr` must be a valid sockaddr /// `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( addr: *const idevice_sockaddr, addr_len: idevice_socklen_t,