From 42a809ba0626d089441fcef398297aa44013d53c Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Thu, 14 Aug 2014 15:50:13 -0700 Subject: [PATCH] Fix 64-bit host build. Bug: 13751317 Change-Id: Ibf62935b7d12a55ffc57242a26a2581b52796847 --- adb/usb_osx.c | 3 ++- fastboot/usb_osx.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/adb/usb_osx.c b/adb/usb_osx.c index 45ce4442e..5efb23bdf 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 0f55e0d82..0b6c515b7 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);