diff options
author | Dan Willemsen <dwillemsen@google.com> | 2016-02-03 23:29:32 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2016-02-25 18:43:55 -0800 |
commit | 9dddd137c72a989b414c1bc8e928fb67ee46fac3 (patch) | |
tree | 6ed4d4de61ea60772f12c2b356b44d3fc3ef1a8b /include/utils | |
parent | 97b3e66d3ef598ccf8cad42bbb723273d8d61f7c (diff) |
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
(cherry picked from commit 86cf941c480de8d5693a24d3feb45574f5c89a86)
Change-Id: I8d39d1951fea1b3011caf585c983e1da7959f7c0
Diffstat (limited to 'include/utils')
-rw-r--r-- | include/utils/ThreadDefs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/utils/ThreadDefs.h b/include/utils/ThreadDefs.h index 9711c1379..ae091e40f 100644 --- a/include/utils/ThreadDefs.h +++ b/include/utils/ThreadDefs.h @@ -29,7 +29,11 @@ extern "C" { #endif +#ifdef _WIN32 +typedef uint32_t android_thread_id_t; +#else typedef void* android_thread_id_t; +#endif typedef int (*android_thread_func_t)(void*); |