diff options
Diffstat (limited to 'ext/IO/IO.xs')
-rw-r--r-- | ext/IO/IO.xs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs index 2eb16f40ec..e558d5c4e0 100644 --- a/ext/IO/IO.xs +++ b/ext/IO/IO.xs @@ -271,6 +271,8 @@ setvbuf(handle, buf, type, size) CODE: /* Should check HAS_SETVBUF once Configure tests for that */ #if defined(PERLIO_IS_STDIO) && defined(_IOFBF) + if (!handle) /* Try input stream. */ + handle = IoIFP(sv_2io(ST(0))); if (handle) RETVAL = setvbuf(handle, buf, type, size); else { |