id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,sensitive 323,Smargopatch and Cygwin,extacy,,"The following code of the Smargopatch doesn't work with Cygwin: {{{ struct serial_struct nuts; ioctl(io->fd, TIOCGSERIAL, &nuts); int custom_baud = io->output_bitrate * io->mhz / io->cardmhz; nuts.custom_divisor = (nuts.baud_base + (custom_baud/2))/ custom_baud; cs_debug(""custom baudrate: cardmhz=%d mhz=%d custom_baud=%d baud_base=%d divisor=%d -> effective baudrate %d"", io->cardmhz, io->mhz, custom_baud, nuts.baud_base, nuts.custom_divisor, nuts.baud_base/nuts.custom_divisor); nuts.flags &= ~ASYNC_SPD_MASK; nuts.flags |= ASYNC_SPD_CUST; ioctl(io->fd, TIOCSSERIAL, &nuts); cfsetospeed(&newtio, IO_Serial_Bitrate(38400)); cfsetispeed(&newtio, IO_Serial_Bitrate(38400)); }}} I'm not a coder, but it seems, that those commands are not present in Cygwin: {{{ /* these structures are only available on linux as fas as we know so limit this code to OS_LINUX */ }}} If you remove ""#ifdef OS_LINUX"", you get the following errors: [[Image(http://www.abload.de/img/errors4iu.jpg)]] If I compile the same code for linux i686, it runs without any error. Is there any way to rewrite the above code, so that it works with Cygwin? ",enhancement,closed,major,,medium,invalid,"Cygwin, Smargo, Patch",,0