This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate a patch from Gentoo for uclibc support.
authorAlexey Tourbin <at@altlinux.ru>
Tue, 28 Dec 2004 14:25:42 +0000 (17:25 +0300)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 3 Jan 2005 17:24:24 +0000 (17:24 +0000)
See :
Subject: Re: Static linking notes --- perl5.8.6 and uClibc
Message-ID: <20041228112542.GB21037@solemn.turbinal.org>

p4raw-id: //depot/perl@23732

perlio.c

index 466bd17..e03ed45 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -2830,7 +2830,11 @@ PerlIOStdio_invalidate_fileno(pTHX_ FILE *f)
     /* XXX this could use PerlIO_canset_fileno() and
      * PerlIO_set_fileno() support from Configure
      */
-#  if defined(__GLIBC__)
+#  if defined(__UCLIBC__)
+    /* uClibc must come before glibc because it defines __GLIBC__ as well. */
+    f->__filedes = -1;
+    return 1;
+#  elif defined(__GLIBC__)
     /* There may be a better way for GLIBC:
        - libio.h defines a flag to not close() on cleanup
      */