summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/stdio/vdprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/stdio/vdprintf.c')
-rw-r--r--libc-top-half/musl/src/stdio/vdprintf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/stdio/vdprintf.c b/libc-top-half/musl/src/stdio/vdprintf.c
new file mode 100644
index 0000000..cef0a1a
--- /dev/null
+++ b/libc-top-half/musl/src/stdio/vdprintf.c
@@ -0,0 +1,13 @@
+#include "stdio_impl.h"
+
+int vdprintf(int fd, const char *restrict fmt, va_list ap)
+{
+ FILE f = {
+ .fd = fd, .lbf = EOF, .write = __stdio_write,
+ .buf = (void *)fmt, .buf_size = 0,
+#if defined(__wasilibc_unmodified_upstream) || defined(_REENTRANT)
+ .lock = -1
+#endif
+ };
+ return vfprintf(&f, fmt, ap);
+}