Prepare Open vSwitch 1.1.2 release.
[sliver-openvswitch.git] / lib / backtrace.c
index d2d1e40..91549db 100644 (file)
@@ -23,7 +23,7 @@
 #include "compiler.h"
 #include "vlog.h"
 
-VLOG_DEFINE_THIS_MODULE(backtrace)
+VLOG_DEFINE_THIS_MODULE(backtrace);
 
 static uintptr_t OVS_UNUSED
 get_max_stack(void)
@@ -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
 }