[BusyBox] bug in ash.c / dirent.h ?

scott scott at industrial-linux.org
Tue Jul 17 21:43:10 UTC 2001


Greetings (and thanks for busybox!). I think I've uncovered something
I don't know how to fix. While compiling ash.c (with uClibc), I get
this error: 

=====
gcc -I- -Os -mpentium -ffast-math  -Os -ffast-math -static -nostdinc
-nostartfiles -nodefaultlibs -nostdlib -I/uclibc/include
-I/uclibc/include/linux -I/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.3/include
-L/uclibc/lib -fomit-frame-pointer -D_GNU_SOURCE  -DBB_VER='"0.53pre"'
-DBB_BT='"2001.07.18-03:26+0000"'  -I.  -c sh.c -o sh.o
In file included from ash.c:86,
                 from sh.c:33:
/uclibc/include/dirent.h:293: parse error before `size_t'
make: *** [sh.o] Error 1
=====

The relevant section of /uclibc/include/dirent.h is:

=====
/* Read directory entries from FD into BUF, reading at most NBYTES.
   Reading starts at offset *BASEP, and *BASEP is updated with the new
   position after reading.  Returns the number of bytes read; zero
when at
   end of directory; or -1 for errors.  */

# ifndef __USE_FILE_OFFSET64
extern __ssize_t getdirentries __P ((int __fd, char *__restrict __buf,
                                     size_t __nbytes,
                                     __off_t *__restrict __basep));
# else
#  ifdef __REDIRECT
extern __ssize_t __REDIRECT (getdirentries,
                             __P ((int __fd, char *__restrict __buf,
                                   size_t __nbytes,
                                   __off64_t *__restrict __basep)),
                             getdirentries64);
#  else
#   define getdirentries getdirentries64
#  endif
# endif
=====

...the error is the first line reading "size_t __nbytes,". This is too
magical for me to see, can anyone tell me what the parse error is so I
can patch it up?
---scott





More information about the busybox mailing list