fixed compiler warning on non-linux archs
authorClifford Wolf <clifford@clifford.at>
Tue, 6 Jan 2015 15:12:43 +0000 (16:12 +0100)
committerClifford Wolf <clifford@clifford.at>
Tue, 6 Jan 2015 15:12:43 +0000 (16:12 +0100)
kernel/log.cc

index 2be425ffd86a72eedbb5152d518e478d59ffd4ca..70bff8f5b62be602dcd36a661a5c26a4d188b52e 100644 (file)
@@ -253,9 +253,9 @@ void log_pop()
        log_flush();
 }
 
+#ifdef __linux__
 void log_backtrace(const char *prefix, int levels)
 {
-#ifdef __linux__
        if (levels <= 0) return;
 
        Dl_info dli;
@@ -341,8 +341,10 @@ void log_backtrace(const char *prefix, int levels)
        }
 
        if (levels <= 9) return;
-#endif
 }
+#else
+void log_backtrace(const char*, int) { }
+#endif
 
 void log_reset_stack()
 {