Fix 32-bit build
Bug: None
Test: build
Change-Id: Id1a9c2bd4526750eca9b85896d0e90eed58b8f51
diff --git a/trusty/keymaster/ipc/trusty_keymaster_ipc.cpp b/trusty/keymaster/ipc/trusty_keymaster_ipc.cpp
index 5e49b69..db1a9f4 100644
--- a/trusty/keymaster/ipc/trusty_keymaster_ipc.cpp
+++ b/trusty/keymaster/ipc/trusty_keymaster_ipc.cpp
@@ -100,8 +100,8 @@
int p = poll(&pfd, 1, poll_timeout_ms);
if (p == 0) {
- ALOGW("write for cmd %d is taking more than %ld nsecs", cmd,
- systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns);
+ ALOGW("write for cmd %d is taking more than %lld nsecs", cmd,
+ (long long)(systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns));
timed_out = true;
poll_timeout_ms *= 2;
if (poll_timeout_ms > max_timeout_ms) {
@@ -118,8 +118,8 @@
ssize_t rc = write(handle_, msg, msg_size);
if (timed_out) {
- ALOGW("write for cmd %d finished after %ld nsecs", cmd,
- systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns);
+ ALOGW("write for cmd %d finished after %lld nsecs", cmd,
+ (long long)(systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns));
}
free(msg);
@@ -169,8 +169,8 @@
int p = poll(&pfd, 1, poll_timeout_ms);
if (p == 0) {
- ALOGW("readv for cmd %d is taking more than %ld nsecs", cmd,
- systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns);
+ ALOGW("readv for cmd %d is taking more than %lld nsecs", cmd,
+ (long long)(systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns));
timed_out = true;
poll_timeout_ms *= 2;
if (poll_timeout_ms > max_timeout_ms) {
@@ -186,8 +186,8 @@
}
rc = readv(handle_, iov, 2);
if (timed_out) {
- ALOGW("readv for cmd %d finished after %ld nsecs", cmd,
- systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns);
+ ALOGW("readv for cmd %d finished after %lld nsecs", cmd,
+ (long long)(systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns));
}
if (rc < 0) {
ALOGE("failed to retrieve response for cmd (%d) to %s: %s\n", cmd, KEYMASTER_PORT,