From 322759f98336b2c12113c3052289c5d83ff9b572 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 6 Apr 2023 17:19:10 +0100 Subject: tools/nolibc/stdio: Implement vprintf() vprintf() is equivalent to vfprintf() to stdout so implement it as a simple wrapper for the existing vfprintf(), allowing us to build kselftest.h. Suggested-by: Willy Tarreau Signed-off-by: Mark Brown Acked-by: Willy Tarreau Acked-by: Paul E. McKenney Acked-by: Shuah Khan Signed-off-by: Shuah Khan --- tools/include/nolibc/stdio.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h index 96ac8afc5aee..6cbbb52836a0 100644 --- a/tools/include/nolibc/stdio.h +++ b/tools/include/nolibc/stdio.h @@ -273,6 +273,12 @@ int vfprintf(FILE *stream, const char *fmt, va_list args) return written; } +static __attribute__((unused)) +int vprintf(const char *fmt, va_list args) +{ + return vfprintf(stdout, fmt, args); +} + static __attribute__((unused, format(printf, 2, 3))) int fprintf(FILE *stream, const char *fmt, ...) { -- cgit v1.2.3