summaryrefslogtreecommitdiffstats
path: root/libc/bionic/malloc_leak.c
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:03:48 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:03:48 -0800
commit4e468ed2eb86a2406e14f1eca82072ee501d05fd (patch)
tree4e05b3c66eef86531e464521a3bf96a1864d4bf5 /libc/bionic/malloc_leak.c
parenta27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 (diff)
downloadbionic-4e468ed2eb86a2406e14f1eca82072ee501d05fd.zip
bionic-4e468ed2eb86a2406e14f1eca82072ee501d05fd.tar.gz
bionic-4e468ed2eb86a2406e14f1eca82072ee501d05fd.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'libc/bionic/malloc_leak.c')
-rw-r--r--libc/bionic/malloc_leak.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libc/bionic/malloc_leak.c b/libc/bionic/malloc_leak.c
index 821ea23..5ddc913 100644
--- a/libc/bionic/malloc_leak.c
+++ b/libc/bionic/malloc_leak.c
@@ -390,7 +390,15 @@ typedef struct
intptr_t* addrs;
} stack_crawl_state_t;
-static _Unwind_Reason_Code trace_function(_Unwind_Context *context, void *arg)
+
+/* depends how the system includes define this */
+#ifdef HAVE_UNWIND_CONTEXT_STRUCT
+typedef struct _Unwind_Context __unwind_context;
+#else
+typedef _Unwind_Context __unwind_context;
+#endif
+
+static _Unwind_Reason_Code trace_function(__unwind_context *context, void *arg)
{
stack_crawl_state_t* state = (stack_crawl_state_t*)arg;
if (state->count) {