This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]