From 0f00932955521c3c2fb8140176ab72f22172c298 Mon Sep 17 00:00:00 2001
From: Marvin Borner
Date: Fri, 26 Feb 2021 14:51:13 +0100
Subject: Started UBSan and stack-smashing check support

---
 libc/print.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'libc/print.c')

diff --git a/libc/print.c b/libc/print.c
index 6d97599..3f6c1cd 100644
--- a/libc/print.c
+++ b/libc/print.c
@@ -213,14 +213,18 @@ int print(const char *str)
 	return strlen(str);
 }
 
+#endif
+
 void panic(const char *format, ...)
 {
 	va_list ap;
 	va_start(ap, format);
+#ifdef kernel
 	vprintf(format, ap);
+#else
+	vfprintf(PATH_ERR, format, ap);
+#endif
 	va_end(ap);
 
 	assert(0);
 }
-
-#endif
-- 
cgit v1.2.3