summaryrefslogtreecommitdiffstats
path: root/base/time
diff options
context:
space:
mode:
authorrmcilroy@chromium.org <rmcilroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-23 18:34:30 +0000
committerrmcilroy@chromium.org <rmcilroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-23 18:34:30 +0000
commitb682464d884a69481d16179f66f463bf2702bb5e (patch)
tree3a2bf27aeff5f19654c6b2f4b26a333d8c72b9b0 /base/time
parent84b92fa8262514ba3097a55b550147837a08e906 (diff)
downloadchromium_src-b682464d884a69481d16179f66f463bf2702bb5e.zip
chromium_src-b682464d884a69481d16179f66f463bf2702bb5e.tar.gz
chromium_src-b682464d884a69481d16179f66f463bf2702bb5e.tar.bz2
[Android]: Avoid time_t special case on 64bit Android devices.
On 64bit devices, time_t is 64 bits so we don't need to use the special case time64_t structure (which will soon be removed from the Android headers for 64bit platforms). BUG=366054,354405 Review URL: https://codereview.chromium.org/249263002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/time')
-rw-r--r--base/time/time_posix.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/time/time_posix.cc b/base/time/time_posix.cc
index 3378038..d83e9e6 100644
--- a/base/time/time_posix.cc
+++ b/base/time/time_posix.cc
@@ -7,7 +7,7 @@
#include <stdint.h>
#include <sys/time.h>
#include <time.h>
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) && !defined(__LP64__)
#include <time64.h>
#endif
#include <unistd.h>
@@ -32,7 +32,7 @@ namespace {
// Define a system-specific SysTime that wraps either to a time_t or
// a time64_t depending on the host system, and associated convertion.
// See crbug.com/162007
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) && !defined(__LP64__)
typedef time64_t SysTime;
SysTime SysTimeFromTimeStruct(struct tm* timestruct, bool is_local) {
@@ -49,7 +49,7 @@ void SysTimeToTimeStruct(SysTime t, struct tm* timestruct, bool is_local) {
gmtime64_r(&t, timestruct);
}
-#else // OS_ANDROID
+#else // OS_ANDROID && !__LP64__
typedef time_t SysTime;
SysTime SysTimeFromTimeStruct(struct tm* timestruct, bool is_local) {