net/virtio: fix incorrect cast of void *
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal_debug.c
index 907fbfa..e1c7554 100644 (file)
@@ -31,7 +31,9 @@
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifdef RTE_BACKTRACE
 #include <execinfo.h>
+#endif
 #include <stdarg.h>
 #include <signal.h>
 #include <stdlib.h>
@@ -47,6 +49,7 @@
 /* dump the stack of the calling core */
 void rte_dump_stack(void)
 {
+#ifdef RTE_BACKTRACE
        void *func[BACKTRACE_SIZE];
        char **symb = NULL;
        int size;
@@ -64,6 +67,7 @@ void rte_dump_stack(void)
        }
 
        free(symb);
+#endif /* RTE_BACKTRACE */
 }
 
 /* not implemented in this environment */
@@ -77,9 +81,6 @@ void __rte_panic(const char *funcname, const char *format, ...)
 {
        va_list ap;
 
-       /* disable history */
-       rte_log_set_history(0);
-
        rte_log(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, "PANIC in %s():\n", funcname);
        va_start(ap, format);
        rte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap);
@@ -98,9 +99,6 @@ rte_exit(int exit_code, const char *format, ...)
 {
        va_list ap;
 
-       /* disable history */
-       rte_log_set_history(0);
-
        if (exit_code != 0)
                RTE_LOG(CRIT, EAL, "Error - exiting with code: %d\n"
                                "  Cause: ", exit_code);