dpkg.c sets stdout, fails on glibc-2.0.7
Larry Doolittle
ldoolitt at recycle.lbl.gov
Tue Mar 13 23:49:30 UTC 2001
Package: busybox
Version: 0.50pre
Severity: normal
Lines 616-618 of dpkg.c look like this:
outfp = freopen(lst_file, "w", stdout);
deb_extract(dpkg_deb_list, NULL, pkg->file);
stdout = freopen(NULL, "w", outfp);
glibc-2.0.7 headers (stdio.h and libio.h) define stdout like this:
extern struct _IO_FILE_plus _IO_stdout_;
#define _IO_stdout ((_IO_FILE*)(&_IO_stdout_))
#define stdout _IO_stdout
The net result is that gcc-2.7.2.3 complains:
dpkg.c: In function `dpkg_dounpack':
dpkg.c:618: invalid lvalue in assignment
This snippet compiles without error with glibc-2.1.2 headers,
where stdout is defined as:
extern FILE *stdout;
Maybe it would be better in the long run to pass a FILE* to deb_extract()?
That, in turn, would require a change to readTarFile().
- Larry Doolittle <LRDoolittle at lbl.gov>
---------------------------------------
Received: (at 1131-done) by bugs.lineo.com; 10 Apr 2001 21:08:02 +0000
More information about the busybox
mailing list