From 06766a8b291e74c120b94a54052f5032adf5af48 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Thu, 26 Jan 2017 14:01:02 -0800 Subject: [PATCH] adb: fix darwin build. Bug: none Test: mma on mac Change-Id: I49ef3c4892c7942a235d317d90386c7d8a872868 --- adb/client/usb_osx.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/adb/client/usb_osx.cpp b/adb/client/usb_osx.cpp index e541f6ecc..d4fc7c0eb 100644 --- a/adb/client/usb_osx.cpp +++ b/adb/client/usb_osx.cpp @@ -44,6 +44,7 @@ using namespace std::chrono_literals; +namespace native { struct usb_handle { UInt8 bulkIn; @@ -298,7 +299,8 @@ AndroidInterfaceAdded(io_iterator_t iterator) usb_handle* handle_p = handle.get(); VLOG(USB) << "Add usb device " << serial; AddDevice(std::move(handle)); - register_usb_transport(handle_p, serial, devpath.c_str(), 1); + register_usb_transport(reinterpret_cast<::usb_handle*>(handle_p), serial, devpath.c_str(), + 1); } } @@ -558,3 +560,4 @@ void usb_kick(usb_handle *handle) { std::lock_guard lock_guard(g_usb_handles_mutex); usb_kick_locked(handle); } +} // namespace native