Fix 32-bit build

Bug: None
Test: build
Change-Id: Id1a9c2bd4526750eca9b85896d0e90eed58b8f51
This commit is contained in:
Marco Nelissen 2021-10-20 10:11:52 -07:00
parent 08fec49a3b
commit 3e923cd527
1 changed files with 8 additions and 8 deletions

View File

@ -100,8 +100,8 @@ std::variant<int, std::vector<uint8_t>> trusty_keymaster_call_2(uint32_t cmd, vo
int p = poll(&pfd, 1, poll_timeout_ms); int p = poll(&pfd, 1, poll_timeout_ms);
if (p == 0) { if (p == 0) {
ALOGW("write for cmd %d is taking more than %ld nsecs", cmd, ALOGW("write for cmd %d is taking more than %lld nsecs", cmd,
systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns); (long long)(systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns));
timed_out = true; timed_out = true;
poll_timeout_ms *= 2; poll_timeout_ms *= 2;
if (poll_timeout_ms > max_timeout_ms) { if (poll_timeout_ms > max_timeout_ms) {
@ -118,8 +118,8 @@ std::variant<int, std::vector<uint8_t>> trusty_keymaster_call_2(uint32_t cmd, vo
ssize_t rc = write(handle_, msg, msg_size); ssize_t rc = write(handle_, msg, msg_size);
if (timed_out) { if (timed_out) {
ALOGW("write for cmd %d finished after %ld nsecs", cmd, ALOGW("write for cmd %d finished after %lld nsecs", cmd,
systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns); (long long)(systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns));
} }
free(msg); free(msg);
@ -169,8 +169,8 @@ std::variant<int, std::vector<uint8_t>> trusty_keymaster_call_2(uint32_t cmd, vo
int p = poll(&pfd, 1, poll_timeout_ms); int p = poll(&pfd, 1, poll_timeout_ms);
if (p == 0) { if (p == 0) {
ALOGW("readv for cmd %d is taking more than %ld nsecs", cmd, ALOGW("readv for cmd %d is taking more than %lld nsecs", cmd,
systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns); (long long)(systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns));
timed_out = true; timed_out = true;
poll_timeout_ms *= 2; poll_timeout_ms *= 2;
if (poll_timeout_ms > max_timeout_ms) { if (poll_timeout_ms > max_timeout_ms) {
@ -186,8 +186,8 @@ std::variant<int, std::vector<uint8_t>> trusty_keymaster_call_2(uint32_t cmd, vo
} }
rc = readv(handle_, iov, 2); rc = readv(handle_, iov, 2);
if (timed_out) { if (timed_out) {
ALOGW("readv for cmd %d finished after %ld nsecs", cmd, ALOGW("readv for cmd %d finished after %lld nsecs", cmd,
systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns); (long long)(systemTime(SYSTEM_TIME_MONOTONIC) - start_time_ns));
} }
if (rc < 0) { if (rc < 0) {
ALOGE("failed to retrieve response for cmd (%d) to %s: %s\n", cmd, KEYMASTER_PORT, ALOGE("failed to retrieve response for cmd (%d) to %s: %s\n", cmd, KEYMASTER_PORT,