diff options
| author | Dan Willemsen <dwillemsen@google.com> | 2016-02-03 23:29:32 -0800 |
|---|---|---|
| committer | Dan Willemsen <dwillemsen@google.com> | 2016-02-05 16:10:10 -0800 |
| commit | 86cf941c480de8d5693a24d3feb45574f5c89a86 (patch) | |
| tree | ab2a1ea9396da91aab8b15ac37784c328527eede /libutils | |
| parent | 9c551a1bece6624bdbdfca40badc07b40b28ec1c (diff) | |
| download | system_core-86cf941c480de8d5693a24d3feb45574f5c89a86.tar.gz system_core-86cf941c480de8d5693a24d3feb45574f5c89a86.tar.bz2 system_core-86cf941c480de8d5693a24d3feb45574f5c89a86.zip | |
Fix windows 64-bit builds
pid_t is 64-bit in 64-bit mingw, but the windows process/thread
functions return a DWORD(uint32_t). Instead of promoting to a pid_t and
fixing the format strings, just use a uint32_t to store the values.
android_thread_id also cannot be a 64-bit pointer, so for windows just
force it to be a uint32_t.
libutils/ProcessCallStack only works under Linux, since it makes heavy
use of /proc. Don't compile it under Windows or Darwin.
Bug: 26957718
Change-Id: I4e43e7cf18a96f22b3a9a08dbab8c3e960c12930
Diffstat (limited to 'libutils')
| -rw-r--r-- | libutils/Android.mk | 4 | ||||
| -rw-r--r-- | libutils/ProcessCallStack.cpp | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/libutils/Android.mk b/libutils/Android.mk index 631b5a3b4..3663c52b7 100644 --- a/libutils/Android.mk +++ b/libutils/Android.mk @@ -22,7 +22,6 @@ commonSources:= \ Log.cpp \ NativeHandle.cpp \ Printer.cpp \ - ProcessCallStack.cpp \ PropertyMap.cpp \ RefBase.cpp \ SharedBuffer.cpp \ @@ -44,7 +43,7 @@ host_commonCflags := -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -Werror # ===================================================== include $(CLEAR_VARS) LOCAL_SRC_FILES:= $(commonSources) -LOCAL_SRC_FILES_linux := Looper.cpp +LOCAL_SRC_FILES_linux := Looper.cpp ProcessCallStack.cpp LOCAL_CFLAGS_darwin := -Wno-unused-parameter LOCAL_MODULE:= libutils LOCAL_STATIC_LIBRARIES := liblog @@ -67,6 +66,7 @@ LOCAL_SRC_FILES:= \ $(commonSources) \ BlobCache.cpp \ Looper.cpp \ + ProcessCallStack.cpp \ Trace.cpp ifeq ($(TARGET_ARCH),mips) diff --git a/libutils/ProcessCallStack.cpp b/libutils/ProcessCallStack.cpp index 011c30291..cdb586d98 100644 --- a/libutils/ProcessCallStack.cpp +++ b/libutils/ProcessCallStack.cpp @@ -146,7 +146,6 @@ void ProcessCallStack::update() { clear(); // Get current time. -#ifndef USE_MINGW { time_t t = time(NULL); struct tm tm; @@ -199,7 +198,6 @@ void ProcessCallStack::update() { ALOGE("%s: Failed to readdir from %s: %s", __FUNCTION__, PATH_SELF_TASK, strerror(code)); } -#endif closedir(dp); } |
