Apply SysV ABI attribute more broadly.

This commit is contained in:
squidbus
2025-09-07 13:39:20 -07:00
parent e1f4ac1472
commit d3e6a718b1
2 changed files with 4 additions and 11 deletions

View File

@@ -1719,10 +1719,7 @@ int usbi_handle_transfer_completion(struct usbi_transfer *itransfer,
(void *) transfer, transfer->callback);
if (transfer->callback) {
libusb_lock_event_waiters (ctx);
typedef void sysv_callback_t(struct libusb_transfer*) __attribute__((sysv_abi));
((sysv_callback_t*)transfer->callback)(transfer);
transfer->callback(transfer);
libusb_unlock_event_waiters(ctx);
}
/* transfer might have been freed by the above call, do not use from

View File

@@ -118,13 +118,9 @@ typedef SSIZE_T ssize_t;
* return type, before the function name. See internal documentation for
* API_EXPORTED.
*/
#if defined(_WIN32) || defined(__CYGWIN__)
#define LIBUSB_CALL WINAPI
#define LIBUSB_CALLV WINAPIV
#else
#define LIBUSB_CALL
#define LIBUSB_CALLV
#endif /* _WIN32 || __CYGWIN__ */
// Apply __attribute__((sysv_abi)) for PS4 compatibility.
#define LIBUSB_CALL __attribute__((sysv_abi))
#define LIBUSB_CALLV LIBUSB_CALL
/** \def LIBUSB_API_VERSION
* \ingroup libusb_misc