1 diff --git a/vendor/adb/client/usb_linux.cpp b/vendor/adb/client/usb_linux.cpp
2 index 25a50bd..0d09c47 100644
3 --- a/vendor/adb/client/usb_linux.cpp
4 +++ b/vendor/adb/client/usb_linux.cpp
5 @@ -59,8 +59,15 @@ using namespace std::literals;
9 + usb_handle() : urb_in(0), urb_out(0) {
10 + this->urb_in = new usbdevfs_urb;
11 + this->urb_out = new usbdevfs_urb;
15 if (fd != -1) unix_close(fd);
21 @@ -72,8 +79,8 @@ struct usb_handle {
23 unsigned writeable = 1;
25 - usbdevfs_urb urb_in;
26 - usbdevfs_urb urb_out;
27 + usbdevfs_urb *urb_in;
28 + usbdevfs_urb *urb_out;
30 bool urb_in_busy = false;
31 bool urb_out_busy = false;
32 @@ -304,7 +311,7 @@ static int usb_bulk_write(usb_handle* h, const void* data, int len) {
33 std::unique_lock<std::mutex> lock(h->mutex);
34 D("++ usb_bulk_write ++");
36 - usbdevfs_urb* urb = &h->urb_out;
37 + usbdevfs_urb* urb = h->urb_out;
38 memset(urb, 0, sizeof(*urb));
39 urb->type = USBDEVFS_URB_TYPE_BULK;
40 urb->endpoint = h->ep_out;
41 @@ -343,7 +350,7 @@ static int usb_bulk_read(usb_handle* h, void* data, int len) {
42 std::unique_lock<std::mutex> lock(h->mutex);
43 D("++ usb_bulk_read ++");
45 - usbdevfs_urb* urb = &h->urb_in;
46 + usbdevfs_urb* urb = h->urb_in;
47 memset(urb, 0, sizeof(*urb));
48 urb->type = USBDEVFS_URB_TYPE_BULK;
49 urb->endpoint = h->ep_in;
50 @@ -388,7 +395,7 @@ static int usb_bulk_read(usb_handle* h, void* data, int len) {
52 D("[ urb @%p status = %d, actual = %d ]", out, out->status, out->actual_length);
54 - if (out == &h->urb_in) {
55 + if (out == h->urb_in) {
56 D("[ reap urb - IN complete ]");
57 h->urb_in_busy = false;
58 if (urb->status != 0) {
59 @@ -397,7 +404,7 @@ static int usb_bulk_read(usb_handle* h, void* data, int len) {
61 return urb->actual_length;
63 - if (out == &h->urb_out) {
64 + if (out == h->urb_out) {
65 D("[ reap urb - OUT compelete ]");
66 h->urb_out_busy = false;
68 @@ -501,10 +508,10 @@ void usb_kick(usb_handle* h) {
69 ** but this ensures that a reader blocked on REAPURB
72 - ioctl(h->fd, USBDEVFS_DISCARDURB, &h->urb_in);
73 - ioctl(h->fd, USBDEVFS_DISCARDURB, &h->urb_out);
74 - h->urb_in.status = -ENODEV;
75 - h->urb_out.status = -ENODEV;
76 + ioctl(h->fd, USBDEVFS_DISCARDURB, h->urb_in);
77 + ioctl(h->fd, USBDEVFS_DISCARDURB, h->urb_out);
78 + h->urb_in->status = -ENODEV;
79 + h->urb_out->status = -ENODEV;
80 h->urb_in_busy = false;
81 h->urb_out_busy = false;