From ca1d5d7b15a0769ad4b4641b650710ee8507accb Mon Sep 17 00:00:00 2001 From: Solal Pirelli Date: Wed, 17 Jan 2018 10:38:09 +0100 Subject: [PATCH] Fix compilation when __STDIO_HAS_OPENLIST is undefined --- libc/stdio/_scanf.c | 2 ++ libc/stdio/vdprintf.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c index 72b436088..6b7eac54c 100644 --- a/libc/stdio/_scanf.c +++ b/libc/stdio/_scanf.c @@ -318,7 +318,9 @@ int vsscanf(__const char *sp, __const char *fmt, va_list ap) f.f.__user_locking = 1; /* Set user locking. */ __stdio_init_mutex(&f.f.__lock); #endif +#ifdef __STDIO_HAS_OPENLIST f.f.__nextopen = NULL; +#endif return vfscanf(&f.f, fmt, ap); } diff --git a/libc/stdio/vdprintf.c b/libc/stdio/vdprintf.c index 0c29eb109..43cedb265 100644 --- a/libc/stdio/vdprintf.c +++ b/libc/stdio/vdprintf.c @@ -52,7 +52,9 @@ int vdprintf(int filedes, const char * __restrict format, va_list arg) f.__user_locking = 1; /* Set user locking. */ __stdio_init_mutex(&f.__lock); #endif +#ifdef __STDIO_HAS_OPENLIST f.__nextopen = NULL; +#endif rv = vfprintf(&f, format, arg);