aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLisa Nguyen <lisa.nguyen@linaro.org>2016-01-20 01:25:25 +0000
committerLisa Nguyen <lisa.nguyen@linaro.org>2016-08-08 11:14:40 -0700
commitc756d740ec158d86a25e105fd81d142e67a584f5 (patch)
treef5c80fb739c4f56e04c43e38d5a59a37f7760fa2
parentbc1911c2ea126ba8073b654ecd4aaa3156b3546d (diff)
downloadpowertop-2.0-c756d740ec158d86a25e105fd81d142e67a584f5.tar.gz
Adding Android workarounds
The changes were based from Daniel Leung's patch. Signed-off-by: Daniel Leung <daniel.leung@linux.intel.com> Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
-rw-r--r--src/main.cpp3
-rw-r--r--src/report/report.cpp4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 991dd9a..9334b2b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -431,8 +431,9 @@ int main(int argc, char **argv)
char workload[PATH_MAX] = {0};
int iterations = 1, auto_tune = 0, sample_interval = 5;
+#ifndef ANDROID
set_new_handler(out_of_memory);
-
+#endif
setlocale (LC_ALL, "");
#ifdef ENABLE_NLS
diff --git a/src/report/report.cpp b/src/report/report.cpp
index ddb2e30..74b486d 100644
--- a/src/report/report.cpp
+++ b/src/report/report.cpp
@@ -38,6 +38,10 @@
#include <limits.h>
#include "report-data-html.h"
+#ifdef ANDROID
+#define strchrnul strchr
+#endif
+
using namespace std;
struct reportstream reportout;