Fix compilation under Cygwin

This commit is contained in:
Marcos Vives Del Sol 2015-02-21 22:57:36 +01:00
parent b978c45a11
commit b6a8745838

View file

@ -77,12 +77,17 @@
const char *serial_ports_device_radix[] = { "tty.SLAB_USBtoUART", "tty.usbserial-", NULL }; const char *serial_ports_device_radix[] = { "tty.SLAB_USBtoUART", "tty.usbserial-", NULL };
# elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__FreeBSD_kernel__) # elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__FreeBSD_kernel__)
const char *serial_ports_device_radix[] = { "cuaU", "cuau", NULL }; 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 }; const char *serial_ports_device_radix[] = { "ttyUSB", "ttyS", "ttyACM", "ttyAMA", "ttyO", NULL };
# else # else
# error "Can't determine serial string for your system" # error "Can't determine serial string for your system"
# endif # endif
#ifdef __CYGWIN__
// Under Cygwin, FIONREAD is defined in this file
# include <asm/socket.h>
#endif
// Work-around to claim uart interface using the c_iflag (software input processing) from the termios struct // Work-around to claim uart interface using the c_iflag (software input processing) from the termios struct
# define CCLAIMED 0x80000000 # define CCLAIMED 0x80000000