diff options
-rw-r--r-- | BUGS | 2 | ||||
-rw-r--r-- | src/libc/stdio.c | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -17,4 +17,4 @@ library, not part of the kernel directory, get rid of kernel_panic there (this requires the kernel_stub.c kernel_panic to exist in libc tests) - +- clang and -O2/-O3 break test_printf.c and printf, no clue why?! diff --git a/src/libc/stdio.c b/src/libc/stdio.c index 87b70ef..9fdf510 100644 --- a/src/libc/stdio.c +++ b/src/libc/stdio.c @@ -58,7 +58,8 @@ static void print_char( const char c ) static void print_newline( void ) { - syscall3( __NR_write, STDOUT_FILENO, (long)"\n", 1 ); + char s[2]; s[0] = '\n'; + syscall3( __NR_write, STDOUT_FILENO, (long)s, 1 ); } #endif |