summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2013-10-30 18:09:52 -0700
committerIgor Murashkin <iam@google.com>2013-10-30 18:09:52 -0700
commite65b7ea8801145626504c724c28aedd0e5038a28 (patch)
tree5e41390a9a7a0ff264560aef6c50a5802f3cb816
parent81f2c3d2117cfe7307ee6efbd82567bd02950965 (diff)
downloadcore-kitkat-mr1-release.tar.gz
Bug: 11324229 Change-Id: Ia50e79b5e2430faea77b0c98902e8e018fb9ceff
-rw-r--r--libutils/Printer.cpp8
-rw-r--r--libutils/ProcessCallStack.cpp2
2 files changed, 10 insertions, 0 deletions
diff --git a/libutils/Printer.cpp b/libutils/Printer.cpp
index b062ef0a7..ac729e05c 100644
--- a/libutils/Printer.cpp
+++ b/libutils/Printer.cpp
@@ -47,10 +47,16 @@ void Printer::printFormatLine(const char* format, ...) {
va_start(arglist, format);
char* formattedString;
+
+#ifndef USE_MINGW
if (vasprintf(&formattedString, format, arglist) < 0) { // returns -1 on error
ALOGE("%s: Failed to format string", __FUNCTION__);
return;
}
+#else
+ return;
+#endif
+
va_end(arglist);
printLine(formattedString);
@@ -113,7 +119,9 @@ void FdPrinter::printLine(const char* string) {
return;
}
+#ifndef USE_MINGW
fdprintf(mFd, mFormatString, mPrefix, string);
+#endif
}
/*
diff --git a/libutils/ProcessCallStack.cpp b/libutils/ProcessCallStack.cpp
index e202b9c1e..f9340c5b0 100644
--- a/libutils/ProcessCallStack.cpp
+++ b/libutils/ProcessCallStack.cpp
@@ -140,6 +140,7 @@ void ProcessCallStack::update(int32_t maxDepth) {
clear();
// Get current time.
+#ifndef USE_MINGW
{
time_t t = time(NULL);
struct tm tm;
@@ -193,6 +194,7 @@ void ProcessCallStack::update(int32_t maxDepth) {
ALOGE("%s: Failed to readdir from %s (errno = %d, '%s')",
__FUNCTION__, PATH_SELF_TASK, -code, strerror(code));
}
+#endif
closedir(dp);
}