mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 14:36:16 +01:00
Re-add no-mangle to usbmuxd ffi function
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user