diff --git a/Userspace/libc/include/stdio.h b/Userspace/libc/include/stdio.h index fee0fe7e..0ebab822 100644 --- a/Userspace/libc/include/stdio.h +++ b/Userspace/libc/include/stdio.h @@ -97,7 +97,7 @@ extern "C" void flockfile(FILE *); FILE *fmemopen(void *restrict, size_t, const char *restrict); FILE *fopen(const char *restrict pathname, const char *restrict mode); - int fprintf(FILE *restrict, const char *restrict, ...); + int fprintf(FILE *restrict stream, const char *restrict format, ...); int fputc(int c, FILE *stream); int fputs(const char *restrict s, FILE *restrict stream); size_t fread(void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream); diff --git a/Userspace/libc/src/std/stdio.c b/Userspace/libc/src/std/stdio.c index 602da4f9..59a5d731 100644 --- a/Userspace/libc/src/std/stdio.c +++ b/Userspace/libc/src/std/stdio.c @@ -214,7 +214,14 @@ export FILE *fopen(const char *restrict pathname, const char *restrict mode) return file; } -export int fprintf(FILE *restrict, const char *restrict, ...); +export int fprintf(FILE *restrict stream, const char *restrict format, ...) +{ + va_list args; + va_start(args, format); + int ret = vfprintf(stream, format, args); + va_end(args); + return ret; +} export int fputc(int c, FILE *stream) {