[uClibc] native build of patched perl 5.8.2 fails with "no member" for f-> filedes

Manuel Novoa III mjn3 at codepoet.org
Mon Mar 8 20:55:49 UTC 2004


On Mon, Mar 08, 2004 at 12:44:49PM -0800, Greg Dowd wrote:
> Any hints?
> 
> Building Perl 5.8.2 natively under 2.6.2 with uclibc 0.9.26 (buildroot),
> I've applied the patches for perlio.c and the Makefile.PLs.  
> 
> Configured using
> sh ./Configure -de -Dcc=gcc -Dusethreads (which configures and makes
> dependencies fine)
> 
> make
> The compile command comes out as
> CCCMD=gcc -DPERL_CORE -c -D_REENTRANT -D_GNU_SOURCE -D_THREADS_HAVE_PIDS
> -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wall
> 
> sh cflags "optimize='-O2'" perlio.o' perlio.c
> 
> And I fail on the changed line in perlio.c  For fun, I tried just changing
> it to f->_fileno but that fails the same way.

Try the following (untested).  In .26, the field member was filedes.
Current cvs uses __filedes (double underscore prefix).

Manuel


--- perl-5.8.2/perlio.c-dist	2003-12-03 14:30:24.000000000 -0700
+++ perl-5.8.2/perlio.c	2003-12-03 14:32:10.000000000 -0700
@@ -2824,7 +2824,15 @@
     /* 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. */
+#  if defined(__MASK_READING)
+    f->__filedes = -1;
+#  else
+    f->filedes = -1;
+#  endif
+    return 1;
+#  elif defined(__GLIBC__)
     /* There may be a better way for GLIBC:
     	- libio.h defines a flag to not close() on cleanup
      */	



More information about the uClibc mailing list