diff options
| author | Ben Pfaff <blp@nicira.com> | 2010-12-16 11:04:14 -0800 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2010-12-23 10:44:36 -0800 |
| commit | e4fd8d288ad1530be566cdeb503fb63a43c149ff (patch) | |
| tree | ba6ba5f30c2701f45fb04181f885c25101a2e534 /lib/backtrace.c | |
| parent | 57b7c6a143a7b86f753ec1928aae3a74b95befd4 (diff) | |
| download | openvswitch-e4fd8d288ad1530be566cdeb503fb63a43c149ff.tar.gz | |
backtrace: Only use __builtin_frame_address if GNU C is in use.
This eliminates one small GNU C dependency.
Diffstat (limited to 'lib/backtrace.c')
| -rw-r--r-- | lib/backtrace.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/backtrace.c b/lib/backtrace.c index 282f6b868..91549db34 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 } |
