summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/perlio.c b/perlio.c
index 7f2d66f922..0c2e256015 100644
--- a/perlio.c
+++ b/perlio.c
@@ -2305,7 +2305,13 @@ PerlIO_vprintf(PerlIO *f, const char *fmt, va_list ap)
SV *sv = newSVpvn("",0);
char *s;
STRLEN len;
+#ifdef NEED_VA_COPY
+ va_list apc;
+ Perl_va_copy(ap, apc);
+ sv_vcatpvf(sv, fmt, &apc);
+#else
sv_vcatpvf(sv, fmt, &ap);
+#endif
s = SvPV(sv,len);
return PerlIO_write(f,s,len);
}