summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-03-07 12:05:14 +0000
committerNicholas Clark <nick@ccl4.org>2011-03-07 12:05:14 +0000
commitb6ae43b72863e12dd1cfc7eb414a05d61a20d8bd (patch)
tree9da70e0f63965d295ded841b59d7863e8b2d4844 /util.c
parent62e452a49a5581bd1de0a5f26274253ee67aa67e (diff)
downloadperl-b6ae43b72863e12dd1cfc7eb414a05d61a20d8bd.tar.gz
Fix building with -Uuseperlio
It was inadvertently broken by 2e0cfa16dea85dd3. Many tests still fail, but that is unrelated to that change. It's more likely that we will remove -Uuseperlio than fix the tests.
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.c b/util.c
index dabc062d23..0ea39c619e 100644
--- a/util.c
+++ b/util.c
@@ -3127,9 +3127,13 @@ Perl_my_pclose(pTHX_ PerlIO *ptr)
dSAVEDERRNO;
const int fd = PerlIO_fileno(ptr);
+#ifdef USE_PERLIO
/* Find out whether the refcount is low enough for us to wait for the
child proc without blocking. */
const bool should_wait = PerlIOUnix_refcnt(fd) == 1;
+#else
+ const bool should_wait = 1;
+#endif
svp = av_fetch(PL_fdpid,fd,TRUE);
pid = (SvTYPE(*svp) == SVt_IV) ? SvIVX(*svp) : -1;