summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorAlexey Tourbin <at@altlinux.ru>2004-12-28 17:25:42 +0300
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-01-03 17:24:24 +0000
commitef8eacb8aa7b0a6c0b0ace784386130fa2680a56 (patch)
treea43c617a1f1a0f1bcb3a7689905167f85cb1cb91 /perlio.c
parent4fccd7c6d34c970c44a7e727436920fb11dfbc20 (diff)
downloadperl-ef8eacb8aa7b0a6c0b0ace784386130fa2680a56.tar.gz
Integrate a patch from Gentoo for uclibc support.
See : Subject: Re: Static linking notes --- perl5.8.6 and uClibc Message-ID: <20041228112542.GB21037@solemn.turbinal.org> p4raw-id: //depot/perl@23732
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/perlio.c b/perlio.c
index 466bd17d5d..e03ed453f0 100644
--- 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
*/