[uClibc] fstat and fstat64

Mike Frysinger vapier at gentoo.org
Fri Jun 3 17:20:07 UTC 2005


On Friday 03 June 2005 12:52 pm, John Bowler wrote:
> Ok, so there *is* a structure layout change, but it *is* in stat64, not in
> stat - because stat keeps the low 16 bits of st_dev in the first two bytes
> of the structure (regardless of architecture), whereas stat64 moves the low
> 16 bits from the first two bytes to bytes[7:8].
>
> Your patch doesn't fix this (it doesn't change st_dev in stat64.)

yes, i did miss that in comparing the three files :)

> The 
> st_rdev change looks right and would work for st_dev too.  The st_blocks
> case looks correct too.  I'll test it with the addition of the st_dev fix
> (on big-endian only.)

i think we can swap out the pad's for the _nsecs to clean up the patch a bit 
since they're the same size as the pad's ...
-mike



More information about the uClibc mailing list