This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
redefinition of 'struct iovec' problem with new libc-ports
- From: "Bridge Wu" <mingqiao dot wu at gmail dot com>
- To: libc-ports at sourceware dot org, crossgcc at sourceware dot org
- Date: Thu, 22 Jun 2006 13:27:41 +0800
- Subject: redefinition of 'struct iovec' problem with new libc-ports
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Q1g26xxSOKKSrwMZ24li/GDTRPxYqrUxUVheHtWDQwpGmgptciYTp0rGaU6EDZEeAdKgh5YHIQSdyjuK3lbwC86UC+ArAP1i96hidq4TJk+i1PBhYzLmmVfZDtJPGIJ9yNhBSetclanrPvUn+CZPti7ZdsrYf5vXSifZkeBb2sQ=
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