This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix building with -Uuseperlio
authorNicholas Clark <nick@ccl4.org>
Mon, 7 Mar 2011 12:05:14 +0000 (12:05 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 7 Mar 2011 12:05:14 +0000 (12:05 +0000)
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.

util.c

diff --git a/util.c b/util.c
index dabc062..0ea39c6 100644 (file)
--- 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;