conflicting types for '__loff_t'

Shaun Jackman
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
                 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[8]: *** [argz_add.lo] Error 1
make[8]: 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 mailing list