Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Unified Diff: base/os_compat_android.cc

Issue 256103005: [Android]: Don't redefine timegm on arm64. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/os_compat_android.cc
diff --git a/base/os_compat_android.cc b/base/os_compat_android.cc
index dc7922a01f742e817b47f7af1585a9e1059655eb..1866363624a1633516fe040795347a369be283da 100644
--- a/base/os_compat_android.cc
+++ b/base/os_compat_android.cc
@@ -9,7 +9,10 @@
#include <math.h>
#include <sys/stat.h>
#include <sys/syscall.h>
+
+#if !defined(__LP64__)
#include <time64.h>
+#endif
#include "base/rand_util.h"
#include "base/strings/string_piece.h"
@@ -37,6 +40,7 @@ int futimes(int fd, const struct timeval tv[2]) {
return syscall(__NR_utimensat, fd, NULL, ts, 0);
}
+#if !defined(__LP64__)
// Android has only timegm64() and no timegm().
Mark Mentovai 2014/04/28 18:56:26 Revise the comment, which is evidently not true fo
// We replicate the behaviour of timegm() when the result overflows time_t.
time_t timegm(struct tm* const t) {
@@ -48,6 +52,7 @@ time_t timegm(struct tm* const t) {
return -1;
return result;
}
+#endif
// The following is only needed when building with GCC 4.6 or higher
// (i.e. not with Android GCC 4.4.3, nor with Clang).
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698