[uClibc] fstat and fstat64

Erik Andersen andersen at codepoet.org
Fri Jun 3 01:37:23 UTC 2005


On Thu Jun 02, 2005 at 08:32:53PM -0400, Mike Frysinger wrote:
> > Nevertheless there is a problem in the existing armbe stuff.  I've attached
> > a patch (tar.gz of a single quilt/patch diff -u).
> 
> just attach the patch in the future please :p
> 
> it looks like the current stat.h is based on linux-2.4's stat64 definition ... 
> 2.6 has a much different (and better) stat.h, so how does the attached patch 
> look ?  (i havent tried compiling with it)
> -mike

> Index: kernel_stat.h
> ===================================================================
> --- kernel_stat.h	(revision 10452)
> +++ kernel_stat.h	(working copy)
> @@ -5,25 +5,47 @@
>   * struct kernel_stat should look like...  It turns out each arch has a 
>   * different opinion on the subject... */
>  
> +/* Also, the stat / stat64 structs changed from linux-2.4 to linux-2.6,
> + * so we have to mung the members accordingly */
> +
> +#define LINUX_2_4 LINUX_VERSION_CODE <  KERNEL_VERSION(2,6,0)

Sigh.  I'd really like to avoid any use of LINUX_VERSION_CODE.
Depending on kernel headers like this is evil.  I see that
libc/sysdeps/linux/arm/ioperm.c also uses it, but that looks
like it can be corrected without too much pain.

Regardless, I find it a bit hard to believe that armeb always
uses the Linux 2.4 code as this patch seems to suggest...

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the uClibc mailing list