diff --git a/libs/libc/src/stdio.cpp b/libs/libc/src/stdio.cpp index c7604a98..ab04a61c 100644 --- a/libs/libc/src/stdio.cpp +++ b/libs/libc/src/stdio.cpp @@ -15,11 +15,11 @@ extern "C" nwritten += fwrite("\n", 1, 1, stdout); return (int)nwritten; } - void perror(const char* s) // FIXME: Print to stderr, whenever we have an stderr. + void perror(const char* s) { int savederr = errno; // This was necessary before, but even more now since we clear errno on successful syscalls now. - if (s && *s) { printf("%s: ", s); } - printf("%s\n", strerror(savederr)); + if (s && *s) { fprintf(stderr, "%s: ", s); } + fprintf(stderr, "%s\n", strerror(savederr)); } } \ No newline at end of file