BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000346 [BusyBox] Other minor always 07-21-05 08:24 07-31-05 15:31
Reporter apgo View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0000346: coreutils/stat.c does not build for toolchains using linux-libc-headers-2.6.x
Description For toolchains built with linux-libc-headers-2.6.x, $busybox/coreutils/stat.c fails to build with:

/tmp/test/busybox/coreutils/stat.c: In function `print_statfs':
/tmp/test/busybox/coreutils/stat.c:183: error: structure has no member named `f_frsize'


`f_frsize' is exclusive to `struct statvfs'. Here's what statfs(2) has to say (See also http://www.linuxbase.org/talks/kingdon200301/): [^]

LSB has deprecated the library calls [f]statfs() and tells us to use [f]statvfs() instead.



However, `struct statvfs' is a 2.6x-specific. So simply s/struct\ statfs/struct\ statvfs/ Just Won't Do It(tm):

/tmp/test/busybox/coreutils/stat.c: In function `print_statfs':
/tmp/test/busybox/coreutils/stat.c:154: error: structure has no member named `f_namelen'
/tmp/test/busybox/coreutils/stat.c:158: error: structure has no member named `f_type'
/tmp/test/busybox/coreutils/stat.c:162: error: structure has no member named `f_type'

The equivalent for `f_namelen' in struct statvfs is `f_namemax'. statvfs also provides no definition for `f_type'; used mainly with calls human_fstype().

Upstream coreutils handled this with a kludge of compat macros: http://savannah.gnu.org/cgi-bin/viewcvs/coreutils/coreutils/src/stat.c?rev=1.87&content-type=text/vnd.viewcvs-markup [^]


Additional Information Using:

linux-libc-headers-2.6.12.0
uClibc-0.9.27
gcc-3.4.2
Attached Files

- Relationships

- Notes
(0000346)
vapier
07-26-05 15:39

the stat.c in busybox was based on the coreutils one ... i was hoping i could get away with all the compat macro's crap since they require compilte-time detection of features

i 'fixed' the problem by just punting all the crappy frsize code
 

- Issue History
Date Modified Username Field Change
07-21-05 08:24 apgo New Issue
07-21-05 08:24 apgo Status new => assigned
07-21-05 08:24 apgo Assigned To  => BusyBox
07-21-05 08:26 apgo Issue Monitored: apgo
07-26-05 15:39 vapier Status assigned => resolved
07-26-05 15:39 vapier Resolution open => fixed
07-26-05 15:39 vapier Note Added: 0000346
07-30-05 00:44 apgo Issue End Monitor: apgo
07-31-05 15:31 vapier Status resolved => closed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker