summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-08-14 23:14:18 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-08-12 19:23:43 +0000
commite1ba39aa6644feb9c5f742f65db6d3363203951f (patch)
tree75cf7a4e16a502022e70fa0dfc85566c83994e04
parentb242ad40b1e0d3984e469e3d35876a4859f4952b (diff)
parent42a809ba0626d089441fcef398297aa44013d53c (diff)
downloadsystem_core-e1ba39aa6644feb9c5f742f65db6d3363203951f.zip
system_core-e1ba39aa6644feb9c5f742f65db6d3363203951f.tar.gz
system_core-e1ba39aa6644feb9c5f742f65db6d3363203951f.tar.bz2
Merge "Fix 64-bit host build."
-rw-r--r--adb/usb_osx.c3
-rw-r--r--fastboot/usb_osx.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/adb/usb_osx.c b/adb/usb_osx.c
index 45ce444..5efb23b 100644
--- a/adb/usb_osx.c
+++ b/adb/usb_osx.c
@@ -197,7 +197,8 @@ AndroidInterfaceAdded(void *refCon, io_iterator_t iterator)
kr = (*dev)->GetDeviceProduct(dev, &product);
kr = (*dev)->GetLocationID(dev, &locationId);
if (kr == 0) {
- snprintf(devpathBuf, sizeof(devpathBuf), "usb:%lX", locationId);
+ snprintf(devpathBuf, sizeof(devpathBuf), "usb:%" PRIu32 "X",
+ (unsigned int)locationId);
devpath = devpathBuf;
}
kr = (*dev)->USBGetSerialNumberStringIndex(dev, &serialIndex);
diff --git a/fastboot/usb_osx.c b/fastboot/usb_osx.c
index 0f55e0d..0b6c515 100644
--- a/fastboot/usb_osx.c
+++ b/fastboot/usb_osx.c
@@ -328,7 +328,8 @@ static int try_device(io_service_t device, usb_handle *handle) {
ERR("GetLocationId");
goto error;
}
- snprintf(handle->info.device_path, sizeof(handle->info.device_path), "usb:%lX", locationId);
+ snprintf(handle->info.device_path, sizeof(handle->info.device_path),
+ "usb:%" PRIu32 "X", (unsigned int)locationId);
kr = (*dev)->USBGetSerialNumberStringIndex(dev, &serialIndex);