From c15f031c3f74a56d3a685b1bff4d9e12c0dab8f4 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 22 Apr 2023 15:29:38 +0300 Subject: [PATCH] LibC: puts() now just calls syscall(SYS_WRITE, ...) --- libc/stdio.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libc/stdio.cpp b/libc/stdio.cpp index 9d6ab98f5..616b7acac 100644 --- a/libc/stdio.cpp +++ b/libc/stdio.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include struct FILE @@ -86,7 +88,7 @@ int putchar(int ch) int puts(const char* str) { - return printf("%s", str); + return syscall(SYS_WRITE, STDOUT_FILENO, str, strlen(str)); } int sprintf(char* __restrict__ stream, const char* __restrict__ format, ...)