--- sourceforge.net/trunk/rdesktop/serial.c 2004/11/03 13:56:52 795 +++ sourceforge.net/trunk/rdesktop/serial.c 2004/11/06 17:27:45 799 @@ -3,6 +3,17 @@ #include #include #include + +#ifdef HAVE_SYS_MODEM_H +#include +#endif +#ifdef HAVE_SYS_FILIO_H +#include +#endif +#ifdef HAVE_SYS_STRTIO_H +#include +#endif + #include "rdesktop.h" #ifdef WITH_DEBUG_SERIAL @@ -111,7 +122,6 @@ /* FIONREAD should really do the same thing as TIOCINQ, where it is * not available */ #ifndef TIOCINQ -#include #define TIOCINQ FIONREAD #endif @@ -385,16 +395,16 @@ break; } -#if 0 +#ifdef CBAUD + ptermios->c_cflag &= ~CBAUD; + ptermios->c_cflag |= speed; +#else /* on systems with separate ispeed and ospeed, we can remember the speed in ispeed while changing DTR with ospeed */ cfsetispeed(pser_inf->ptermios, speed); cfsetospeed(pser_inf->ptermios, pser_inf->dtr ? speed : 0); #endif - ptermios->c_cflag &= ~CBAUD; - ptermios->c_cflag |= speed; - ptermios->c_cflag &= ~(CSTOPB | PARENB | PARODD | CSIZE | CRTSCTS); switch (pser_inf->stop_bits) {