2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-17 14:28:02 +00:00

backtrace: Only use __builtin_frame_address if GNU C is in use.

This eliminates one small GNU C dependency.
This commit is contained in:
Ben Pfaff
2010-12-16 11:04:14 -08:00
parent 57b7c6a143
commit e4fd8d288a

View File

@@ -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
}