redefinition of 'struct iovec' problem with new libc-ports

Bridge Wu mingqiao.wu@gmail.com
Thu Jun 22 05:27:00 GMT 2006


Hello,

I checked out the latest libc-ports from cvs. I met building problem
when using it to build arm-linux toolchain. I used crosstool. The
error appeared at building glibc startfiles which are required by
shared libgcc. In detail, it appeared at compiling
glibc-2.4/sysdeps/unix/sysv/linux/init-first.c. The error is
redefinition error.

In file included from ../ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h:26,
                 from ../io/fcntl.h:34,
                 from ../include/fcntl.h:2,
                 from ../sysdeps/unix/sysv/linux/init-first.c:22:
../sysdeps/unix/sysv/linux/bits/uio.h:20:3: error: #error "Never include <bits/u
io.h> directly; use <sys/uio.h> instead."
In file included from ../misc/sys/uio.h:29,
                 from ../include/sys/uio.h:2,
                 from ../socket/sys/socket.h:27,
                 from ../include/sys/socket.h:2,
                 from ../inet/netinet/in.h:24,
                 from ../include/netinet/in.h:3,
                 from ../resolv/resolv.h:57,
                 from ../include/resolv.h:12,
                 from ../nptl/descr.h:39,
                 from ../ports/sysdeps/arm/nptl/tls.h:63,
                 from ../include/tls.h:6,
                 from ../include/link.h:45,
                 from ../include/dlfcn.h:3,
                 from ../sysdeps/generic/ldsodefs.h:32,
                 from ../ports/sysdeps/arm/ldsodefs.h:39,
                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
                 from ../sysdeps/unix/sysv/linux/init-first.c:30:
../sysdeps/unix/sysv/linux/bits/uio.h:43: error: redefinition of 'struct iovec'

This is because fcntl.h added below code snippet. If I removed these
three lines, I can get the final toolchain successfully.

in ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h:
#ifdef __USE_GNU
# include <bits/uio.h>
#endif

I'm not clear why this code snippet is needed? If I must use it, do I
miss anything else?

-- 
best regards,
-Bridge

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list