diff --git a/libnfc/buses/uart.c b/libnfc/buses/uart.c index 953c126..72594b0 100644 --- a/libnfc/buses/uart.c +++ b/libnfc/buses/uart.c @@ -77,12 +77,17 @@ const char *serial_ports_device_radix[] = { "tty.SLAB_USBtoUART", "tty.usbserial-", NULL }; # elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__FreeBSD_kernel__) const char *serial_ports_device_radix[] = { "cuaU", "cuau", NULL }; -# elif defined (__linux__) +# elif defined (__linux__) || defined (__CYGWIN__) const char *serial_ports_device_radix[] = { "ttyUSB", "ttyS", "ttyACM", "ttyAMA", "ttyO", NULL }; # else # error "Can't determine serial string for your system" # endif +#ifdef __CYGWIN__ +// Under Cygwin, FIONREAD is defined in this file +# include +#endif + // Work-around to claim uart interface using the c_iflag (software input processing) from the termios struct # define CCLAIMED 0x80000000