Opened 12 years ago

Closed 12 years ago

#323 closed enhancement (invalid)

Smargopatch and Cygwin

Reported by: extacy Owned by:
Priority: major Component:
Severity: medium Keywords: Cygwin, Smargo, Patch
Cc: Sensitive: no


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:

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?

Change History (1)

comment:1 by nightmann, 12 years ago

Resolution: invalid
Status: newclosed

oscam developer team are not the maintainer of smargopatch. please ask the maintainer.

Note: See TracTickets for help on using tickets.