summaryrefslogtreecommitdiffstats
path: root/services/common_time/common_time_server.cpp
diff options
context:
space:
mode:
authorJohn Grossman <johngro@google.com>2012-02-16 14:53:24 -0800
committerJohn Grossman <johngro@google.com>2012-02-16 14:56:08 -0800
commitb8525e9a76d63a2dc26c87577940a058e70e3dd5 (patch)
treebd8e55493de48297a1811e118be7ed902e72f189 /services/common_time/common_time_server.cpp
parentd72031cee315438c4728fd3f0cce1971a9f00717 (diff)
downloadframeworks_base-b8525e9a76d63a2dc26c87577940a058e70e3dd5.zip
frameworks_base-b8525e9a76d63a2dc26c87577940a058e70e3dd5.tar.gz
frameworks_base-b8525e9a76d63a2dc26c87577940a058e70e3dd5.tar.bz2
Fix the build.
Looks like not all flavors of the android build include support for std::numeric_limits. Fix the build by using a simple macro for now. A more elegant solution can be searched for once the build is green again. Change-Id: I18329cd0d26ca69de6a52df9a1c6eeb3ba063b48
Diffstat (limited to 'services/common_time/common_time_server.cpp')
-rw-r--r--services/common_time/common_time_server.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/common_time/common_time_server.cpp b/services/common_time/common_time_server.cpp
index 4af73b5..4db516a 100644
--- a/services/common_time/common_time_server.cpp
+++ b/services/common_time/common_time_server.cpp
@@ -50,7 +50,7 @@
#include "clock_recovery.h"
#include "common_clock.h"
-using std::numeric_limits;
+#define MAX_INT ((int)0x7FFFFFFF)
namespace android {
@@ -1335,8 +1335,8 @@ int CommonTimeServer::TimeoutHelper::msecTillTimeout() {
uint64_t deltaMsec = (((mEndTime - now) + 999999) / 1000000);
- if (deltaMsec > static_cast<uint64_t>(std::numeric_limits<int>::max()))
- return std::numeric_limits<int>::max();
+ if (deltaMsec > static_cast<uint64_t>(MAX_INT))
+ return MAX_INT;
return static_cast<int>(deltaMsec);
}