Make libasyncio headers usable from C
This allows us to enable LTP tests
for io_* syscalls.
Bug: 31152298
Test: LTP tests pass
Change-Id: Ic25189d8bf25cdacfa0f144ac57c7b2827adcd9f
diff --git a/adb/daemon/usb.cpp b/adb/daemon/usb.cpp
index 87ed3db..20fb6a3 100644
--- a/adb/daemon/usb.cpp
+++ b/adb/daemon/usb.cpp
@@ -317,6 +317,8 @@
goto err;
}
+ memset(&h->read_aiob.ctx, 0, sizeof(h->read_aiob.ctx));
+ memset(&h->write_aiob.ctx, 0, sizeof(h->write_aiob.ctx));
if (io_setup(USB_FFS_NUM_BUFS, &h->read_aiob.ctx) ||
io_setup(USB_FFS_NUM_BUFS, &h->write_aiob.ctx)) {
D("[ aio: got error on io_setup (%d) ]", errno);