This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Conflicting ioctl signature
- From: Martin RÃsch <martin dot roesch at neratec dot com>
- To: eCos discuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 15 Jul 2010 12:24:39 +0200 (CEST)
- Subject: [ECOS] Conflicting ioctl signature
Hi everybody,
I'm using uSTL with file stream support in combination with the FreeBSD TCP/IP stack and came across missmatching signatures for ioctl.
The ustl/config.h exports the function like this:
//
// There is no eCos header that exports this function so we do it here
//
#ifdef CYGCLS_USTL_FSTREAMS
__externC int ioctl( int fd, CYG_ADDRWORD com, ... );
#endif
Whereas the FreeBSD stack declared the ioctl function as:
__BEGIN_DECLS
int ioctl __P((int, unsigned long, ...));
__END_DECLS
The second parameter leads to an error, when linking against the eCos library:
install/include/ustl/config.h:96: error: declaration of C function âint ioctl(int, CYG_ADDRWORD, ...)â conflicts with
install/include/sys/ioctl.h:86: error: previous declaration âint ioctl(int, long unsigned int, ...)â here
Did I do something wrong, or does the signature declaration in uSTL have to be changed to match the FreeBSD (and OpenBSD btw.) declaration?
Regards,
Martin
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss