From b6a8745838673e96c9215f4b73781cde0ac2f3b6 Mon Sep 17 00:00:00 2001 From: Marcos Vives Del Sol Date: Sat, 21 Feb 2015 22:57:36 +0100 Subject: [PATCH] Fix compilation under Cygwin --- libnfc/buses/uart.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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