From 69e6fe89fa9baafeca3e3515bb50897cd8ee7c35 Mon Sep 17 00:00:00 2001 From: Kacper Date: Mon, 15 Dec 2025 18:24:54 +0100 Subject: Add getauxval and cleanup libc startup --- lib/libc/stdio/fdopen.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'lib/libc/stdio/fdopen.c') diff --git a/lib/libc/stdio/fdopen.c b/lib/libc/stdio/fdopen.c index c5db3854..bded5f27 100644 --- a/lib/libc/stdio/fdopen.c +++ b/lib/libc/stdio/fdopen.c @@ -1,10 +1,7 @@ -#include "__stdio.h" // for __FILE, __libc_fadd -#include "features.h" // for __weak -#include "stdatomic.h" // for atomic_flag_clear -#include "stddef.h" // for NULL - -#include // for FILE, _IONBF, SEEK_END, _IOLBF, fdopen -#include // for calloc, free +#include "__stdio.h" // for __FILE, __libc_fadd +#include // for FILE, _IONBF, SEEK_END, _IOLBF, fdopen +#include // for calloc, free +#include #include // for lseek, off_t __weak void __stdio_cleanup(void) @@ -15,8 +12,7 @@ FILE *fdopen(int fildes, const char *mode) { FILE *stream; - if (mode == NULL || - (mode[0] != 'r' && mode[0] != 'w' && mode[0] != 'a')) { + if (mode == NULL || (mode[0] != 'r' && mode[0] != 'w' && mode[0] != 'a')) { return NULL; } -- cgit v1.2.3