# HG changeset patch # User asl # Date 1107892734 0 # Node ID 314ff4b264b6c791f94187d300c0902b9078c961 # Parent 8ebde8529dc755c46c5f7d966e81de30d07634b3 * src/io.cxx (ioctl): Change ioctl to use varargs so that it works on with h8300 who's compiler does not like doing it the other way. diff --git a/packages/io/fileio/current/ChangeLog b/packages/io/fileio/current/ChangeLog --- a/packages/io/fileio/current/ChangeLog +++ b/packages/io/fileio/current/ChangeLog @@ -1,3 +1,8 @@ +2005-01-27 Yoshinori Sato + + * src/io.cxx (ioctl): Change ioctl to use varargs so that it works + on with h8300 who's compiler does not like doing it the other way. + 2005-01-22 Andrew Lunn * src/misc.cxx (cyg_fs_root_lookup): New function to find the mount diff --git a/packages/io/fileio/current/src/io.cxx b/packages/io/fileio/current/src/io.cxx --- a/packages/io/fileio/current/src/io.cxx +++ b/packages/io/fileio/current/src/io.cxx @@ -252,18 +252,24 @@ readwritev( int fd, const cyg_iovec *_io //========================================================================== // ioctl -__externC int ioctl( int fd, CYG_ADDRWORD com, CYG_ADDRWORD data ) +__externC int ioctl( int fd, CYG_ADDRWORD com, ... ) { FILEIO_ENTRY(); int ret; cyg_file *fp; - + va_list ap; + CYG_ADDRWORD data; + fp = cyg_fp_get( fd ); if( fp == NULL ) FILEIO_RETURN(EBADF); + va_start(ap, com); + data = va_arg(ap, CYG_ADDRWORD); + va_end(ap); + LOCK_FILE( fp ); ret = fp->f_ops->fo_ioctl( fp, com, data );