[BusyBox] Goofiness in gunzip.c

Mark Whitley markw at lineo.com
Fri Feb 2 20:39:16 UTC 2001


On Fri, Feb 02, 2001 at 03:26:37PM -0500, Richard June wrote:
> while working on my grep patch, I came across this in gunzip.c
> 
> make CFLAGS=-DLINES_BEFORE_AFTER
> gcc -DLINES_BEFORE_AFTER   -c gunzip.c -o gunzip.o
> gunzip.c: In function `gunzip_main':
> gunzip.c:1336: `O_NOFOLLOW' undeclared (first use in this function)
> gunzip.c:1336: (Each undeclared identifier is reported only once
> gunzip.c:1336: for each function it appears in.)
> make: *** [gunzip.o] Error 1
> 
> at first I thought it was just that fnctl.h wasn't being included, but 
> #include<fcntl.h> didn't seem to fix it, so I figured y'all might be 
> interested. I spent my requisite 5 minutes trying to make it work. :-)
> I'll have a grep patch for everyones perusal sooner than I thought, 
> which is a good thing. it also will have a basic buffer type setup that 
> we can prolly use in syslog as well. (Oh Joy Ren!)

Is this where you're seeing it?

   1902         /* Open output fille */
   1903 #if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1)
   1904         outFileNum = open(ofname, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW);
   1905 #else
   1906         outFileNum = open(ofname, O_RDWR | O_CREAT | O_EXCL);
   1907 #endif

(It's the only place where I could find the string 'O_NOFOLLOW'.)

Maybe there's a problem with the #if stmt, or maybe theres some difference
between your libc.so and your devel headers (i.e. devel headers are for a
newer version of glibc than the one that is on your system).

Mark Whitley
markw at lineo.com





More information about the busybox mailing list