From e4fd8d288ad1530be566cdeb503fb63a43c149ff Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 16 Dec 2010 11:04:14 -0800 Subject: [PATCH] backtrace: Only use __builtin_frame_address if GNU C is in use. This eliminates one small GNU C dependency. --- lib/backtrace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/backtrace.c b/lib/backtrace.c index 282f6b86..91549db3 100644 --- a/lib/backtrace.c +++ b/lib/backtrace.c @@ -83,6 +83,7 @@ in_stack(void *p) void backtrace_capture(struct backtrace *backtrace) { +#ifdef __GNUC__ void **frame; size_t n; @@ -95,4 +96,7 @@ backtrace_capture(struct backtrace *backtrace) backtrace->frames[n++] = (uintptr_t) frame[1]; } backtrace->n_frames = n; +#else + backtrace->n_frames = 0; +#endif } -- 2.30.2