diff options
Diffstat (limited to 'mtp/MtpDataPacket.cpp')
-rw-r--r-- | mtp/MtpDataPacket.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mtp/MtpDataPacket.cpp b/mtp/MtpDataPacket.cpp index 2c517252a..845db968e 100644 --- a/mtp/MtpDataPacket.cpp +++ b/mtp/MtpDataPacket.cpp @@ -427,7 +427,11 @@ int MtpDataPacket::readDataAsync(struct usb_request *req) { // Wait for result of readDataAsync int MtpDataPacket::readDataWait(struct usb_device *device) { +#ifdef HAS_USBHOST_TIMEOUT + struct usb_request *req = usb_request_wait(device, 200); +#else struct usb_request *req = usb_request_wait(device); +#endif return (req ? req->actual_length : -1); } |