Index: base/third_party/nspr/prtime.cc |
diff --git a/base/third_party/nspr/prtime.cc b/base/third_party/nspr/prtime.cc |
index f1fcf26cd81842765477a38a90e0f8ceeb58187e..61b73039267b4d606b4dec695292280b1f1bf0f2 100644 |
--- a/base/third_party/nspr/prtime.cc |
+++ b/base/third_party/nspr/prtime.cc |
@@ -71,6 +71,9 @@ |
#include <windows.h> |
#elif defined(OS_MACOSX) |
#include <CoreFoundation/CoreFoundation.h> |
+#elif defined(OS_ANDROID) |
+#include <ctype.h> |
+#include "base/os_compat_android.h" // For timegm() |
#endif |
#include <errno.h> /* for EINVAL */ |
#include <time.h> |
@@ -138,10 +141,10 @@ PR_ImplodeTime(const PRExplodedTime *exploded) |
gregorian_date.minute = exploded->tm_min; |
gregorian_date.second = exploded->tm_sec; |
- // Compute |absolute_time| in seconds, correct for gmt and dst |
+ // Compute |absolute_time| in seconds, correct for gmt and dst |
// (note the combined offset will be negative when we need to add it), then |
// convert to microseconds which is what PRTime expects. |
- CFAbsoluteTime absolute_time = |
+ CFAbsoluteTime absolute_time = |
CFGregorianDateGetAbsoluteTime(gregorian_date, NULL); |
PRTime result = static_cast<PRTime>(absolute_time); |
result -= exploded->tm_params.tp_gmt_offset + |