conflicting types for '__loff_t'
Thu Aug 18 23:30:00 GMT 2005
As mentioned in a previous note, I think you are in unchartered waters.
Getting newlib to coexist with glibc headers is a touchy thing and the
current set up has only worked for x86 native on ia32. It may be the
right thing to do or it may open a can of worms. At a minimum, you
would at least need a check for __amd64__ in the libc/sys/linux header
files for certain types.
-- Jeff J.
Shaun Jackman wrote:
> When compiling newlib for i686-pc-linux-gnu the build complains that
> __loff_t is being redefined:
> $ make
> In file included from
> from ../../../../../../newlib/libc/argz/argz_add.c:8:
> /usr/include/bits/types.h:186: error: conflicting types for '__loff_t'
> error: previous declaration of '__loff_t' was here
> make: *** [argz_add.lo] Error 1
> make: Leaving directory
> $ grep -A2 GNUC newlib/libc/include/machine/types.h
> #ifdef __GNUC__
> __extension__ typedef long long int __loff_t;
> $ grep off /usr/include/bits/types.h
> __STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */
> __STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and
> offsets (LFS). */
> typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */
> Should machine/types.h include bits/types.h for the Linux target?
More information about the Newlib