diff options
author | Igor Murashkin | 2013-10-30 20:09:52 -0500 |
---|---|---|
committer | Igor Murashkin | 2013-10-30 20:09:52 -0500 |
commit | e65b7ea8801145626504c724c28aedd0e5038a28 (patch) | |
tree | 5e41390a9a7a0ff264560aef6c50a5802f3cb816 | |
parent | 81f2c3d2117cfe7307ee6efbd82567bd02950965 (diff) | |
download | platform-system-core-android-4.4.2_r2.tar.gz platform-system-core-android-4.4.2_r2.tar.xz platform-system-core-android-4.4.2_r2.zip |
utils: Fix broken sdk build on windowsandroid-4.4.2_r2.0.1android-4.4.2_r2android-4.4.2_r1.0.1android-4.4.2_r1android-4.4.1_r1.0.1android-4.4.1_r1
Bug: 11324229
Change-Id: Ia50e79b5e2430faea77b0c98902e8e018fb9ceff
-rw-r--r-- | libutils/Printer.cpp | 8 | ||||
-rw-r--r-- | libutils/ProcessCallStack.cpp | 2 |
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, ...) { | |||
47 | va_start(arglist, format); | 47 | va_start(arglist, format); |
48 | 48 | ||
49 | char* formattedString; | 49 | char* formattedString; |
50 | |||
51 | #ifndef USE_MINGW | ||
50 | if (vasprintf(&formattedString, format, arglist) < 0) { // returns -1 on error | 52 | if (vasprintf(&formattedString, format, arglist) < 0) { // returns -1 on error |
51 | ALOGE("%s: Failed to format string", __FUNCTION__); | 53 | ALOGE("%s: Failed to format string", __FUNCTION__); |
52 | return; | 54 | return; |
53 | } | 55 | } |
56 | #else | ||
57 | return; | ||
58 | #endif | ||
59 | |||
54 | va_end(arglist); | 60 | va_end(arglist); |
55 | 61 | ||
56 | printLine(formattedString); | 62 | printLine(formattedString); |
@@ -113,7 +119,9 @@ void FdPrinter::printLine(const char* string) { | |||
113 | return; | 119 | return; |
114 | } | 120 | } |
115 | 121 | ||
122 | #ifndef USE_MINGW | ||
116 | fdprintf(mFd, mFormatString, mPrefix, string); | 123 | fdprintf(mFd, mFormatString, mPrefix, string); |
124 | #endif | ||
117 | } | 125 | } |
118 | 126 | ||
119 | /* | 127 | /* |
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) { | |||
140 | clear(); | 140 | clear(); |
141 | 141 | ||
142 | // Get current time. | 142 | // Get current time. |
143 | #ifndef USE_MINGW | ||
143 | { | 144 | { |
144 | time_t t = time(NULL); | 145 | time_t t = time(NULL); |
145 | struct tm tm; | 146 | struct tm tm; |
@@ -193,6 +194,7 @@ void ProcessCallStack::update(int32_t maxDepth) { | |||
193 | ALOGE("%s: Failed to readdir from %s (errno = %d, '%s')", | 194 | ALOGE("%s: Failed to readdir from %s (errno = %d, '%s')", |
194 | __FUNCTION__, PATH_SELF_TASK, -code, strerror(code)); | 195 | __FUNCTION__, PATH_SELF_TASK, -code, strerror(code)); |
195 | } | 196 | } |
197 | #endif | ||
196 | 198 | ||
197 | closedir(dp); | 199 | closedir(dp); |
198 | } | 200 | } |