summaryrefslogtreecommitdiffstats
path: root/fastboot/usb_osx.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-06-24 13:28:24 -0700
committerElliott Hughes <enh@google.com>2015-06-24 13:28:24 -0700
commitfbcb93abe2d8a05ee40487a7c7a0da8ad8f1081d (patch)
tree54af625be207a6fd1e290abaf8c8edf89eb2559e /fastboot/usb_osx.cpp
parent9137d65e9ba7e8a83440e1e2058ad19b2d6b6434 (diff)
downloadsystem_core-fbcb93abe2d8a05ee40487a7c7a0da8ad8f1081d.tar.gz
system_core-fbcb93abe2d8a05ee40487a7c7a0da8ad8f1081d.tar.bz2
system_core-fbcb93abe2d8a05ee40487a7c7a0da8ad8f1081d.zip
Fix Mac fastboot build.
Change-Id: I516c07cee39845caaa47608604eeb30ce15f06cb
Diffstat (limited to 'fastboot/usb_osx.cpp')
-rw-r--r--fastboot/usb_osx.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fastboot/usb_osx.cpp b/fastboot/usb_osx.cpp
index 0b6c515b7..a959566e0 100644
--- a/fastboot/usb_osx.cpp
+++ b/fastboot/usb_osx.cpp
@@ -26,6 +26,7 @@
* SUCH DAMAGE.
*/
+#include <inttypes.h>
#include <stdio.h>
#include <CoreFoundation/CoreFoundation.h>
#include <IOKit/IOKitLib.h>
@@ -121,7 +122,7 @@ static int try_interfaces(IOUSBDeviceInterface182 **dev, usb_handle *handle) {
result = (*plugInInterface)->QueryInterface(
plugInInterface,
CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID),
- (LPVOID) &interface);
+ (LPVOID*) &interface);
// No longer need the intermediate plugin
(*plugInInterface)->Release(plugInInterface);
@@ -279,7 +280,7 @@ static int try_device(io_service_t device, usb_handle *handle) {
// Now create the device interface.
result = (*plugin)->QueryInterface(plugin,
- CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID), (LPVOID) &dev);
+ CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID), (LPVOID*) &dev);
if ((result != 0) || (dev == NULL)) {
ERR("Couldn't create a device interface (%08x)\n", (int) result);
goto error;
@@ -432,7 +433,7 @@ static int init_usb(ifc_match_func callback, usb_handle **handle) {
}
if (h.success) {
- *handle = calloc(1, sizeof(usb_handle));
+ *handle = reinterpret_cast<usb_handle*>(calloc(1, sizeof(usb_handle)));
memcpy(*handle, &h, sizeof(usb_handle));
ret = 0;
break;