[uClibc]Sparc port

David Schleef ds at schleef.org
Tue Mar 27 21:08:59 UTC 2001


On Tue, Mar 06, 2001 at 05:48:30PM -0800, Matt Bosworth wrote:
> Eric,
> 
> 	First, thanks for the header files, that got rid of several
> errors. . .
> 
> 	However, there are still some symbol redefinitions caused 
> by statfix.c.  statfix.c includes both <asm/stat.h> and <sys/stat.h>, 
> but both of them define several types (fd_set, dev_t, ino_t, pid_t,
> etc.)  The only way I could think of to fix this is an ugly hack : 
> 
> /* Pull in whatever this particular arch's kernel thinks the kernel
> version of
>  * struct stat should look like.  It turns out that each arch has a
> different
>  * opinion on the subject, and different kernel revs use different
> names... */
> 
> #define fd_set _K_fd_set
> #define dev_t _K_dev_t
> #define ino_t _K_ino_t
...
> /* Now pull in libc's version of stat */
> #define stat libc_stat
> #include <sys/stat.h>
> #undef stat


I think this is the correct way to solve the problem.  An alternative
is to include appropriatly modified copies of headers from the
different kernels we support, but I'm not sure if that's a 12 oz
can or the giant 128 oz can of worms.

(And, by the way, this change is necessary for powerpc as well.)




dave...






More information about the uClibc mailing list