[BusyBox-cvs] [BusyBox 0000346]: coreutils/stat.c does not build for toolchains using linux-libc-headers-2.6.x

bugs at busybox.net bugs at busybox.net
Sun Jul 31 22:31:25 UTC 2005


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=346 
====================================================================== 
Reported By:                apgo
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   346
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             07-21-2005 08:24 PDT
Last Modified:              07-31-2005 15:31 PDT
====================================================================== 
Summary:                    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



====================================================================== 

---------------------------------------------------------------------- 
 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  
======================================================================




More information about the busybox-cvs mailing list