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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user