update_engine: Use integer types from stdint.h
This CL replaces the deprecated int* and uint* types from
'base/basictypes.h' with the int*_t and uint*_t types from 'stdint.h'.
BUG=chromium:401356
TEST=`FEATURES=test emerge-$BOARD update_engine`
Change-Id: I658b34ad9e6feb938e0b569b72947a052ef8f8af
Reviewed-on: https://chromium-review.googlesource.com/211380
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
diff --git a/utils.cc b/utils.cc
index 8f1a122..f69dab4 100644
--- a/utils.cc
+++ b/utils.cc
@@ -4,6 +4,8 @@
#include "update_engine/utils.h"
+#include <stdint.h>
+
#include <attr/xattr.h>
#include <dirent.h>
#include <errno.h>
@@ -732,7 +734,7 @@
// 0x12: e_machine, 2 byte endianness based on ei_data
if (size < 0x12 + 2)
return true;
- uint16 e_machine = *reinterpret_cast<const uint16*>(buffer+0x12);
+ uint16_t e_machine = *reinterpret_cast<const uint16_t*>(buffer+0x12);
// Fix endianess regardless of the host endianess.
if (ei_data == 1)
e_machine = le16toh(e_machine);
@@ -1373,8 +1375,8 @@
}
Time TimeFromStructTimespec(struct timespec *ts) {
- int64 us = static_cast<int64>(ts->tv_sec) * Time::kMicrosecondsPerSecond +
- static_cast<int64>(ts->tv_nsec) / Time::kNanosecondsPerMicrosecond;
+ int64_t us = static_cast<int64_t>(ts->tv_sec) * Time::kMicrosecondsPerSecond +
+ static_cast<int64_t>(ts->tv_nsec) / Time::kNanosecondsPerMicrosecond;
return Time::UnixEpoch() + TimeDelta::FromMicroseconds(us);
}