conflicting types for '__loff_t'
Shaun Jackman
sjackman@gmail.com
Thu Aug 18 19:58:00 GMT 2005
When compiling newlib for i686-pc-linux-gnu the build complains that
__loff_t is being redefined:
$ make
...
In file included from
/home/sjackman/work/debian/newlib/newlib-1.13.0/_build/i686-pc-linux-gnu/64/newlib/targ-include/sys/types.h:131,
from ../../../../../../newlib/libc/argz/argz_add.c:8:
/usr/include/bits/types.h:186: error: conflicting types for '__loff_t'
/home/sjackman/work/debian/newlib/newlib-1.13.0/newlib/libc/include/machine/types.h:39:
error: previous declaration of '__loff_t' was here
make[8]: *** [argz_add.lo] Error 1
make[8]: Leaving directory
`/home/sjackman/work/debian/newlib/newlib-1.13.0/_build/i686-pc-linux-gnu/64/newlib/libc/argz'
...
$ grep -A2 GNUC newlib/libc/include/machine/types.h
#ifdef __GNUC__
__extension__ typedef long long int __loff_t;
#else
$ 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?
Cheers,
Shaun
More information about the Newlib
mailing list