diff --git a/configure.ac b/configure.ac index fa379fe..0350d59 100644 --- a/configure.ac +++ b/configure.ac @@ -16,6 +16,11 @@ AC_PATH_XTRA AC_SEARCH_LIBS(socket, socket) AC_SEARCH_LIBS(inet_aton, resolv) +AC_CHECK_HEADER(sys/select.h, AC_DEFINE(HAVE_SYS_SELECT_H)) +AC_CHECK_HEADER(sys/modem.h, AC_DEFINE(HAVE_SYS_MODEM_H)) +AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(HAVE_SYS_FILIO_H)) +AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H)) + rpath="" # diff --git a/rdesktop.h b/rdesktop.h index 55aa728..f8eedf3 100644 --- a/rdesktop.h +++ b/rdesktop.h @@ -22,7 +22,13 @@ #include #include #include +#ifdef HAVE_SYS_SELECT_H #include +#else +#include +#include +#include +#endif #define VERSION "1.3.1" diff --git a/serial.c b/serial.c index f14fbd3..7946391 100644 --- a/serial.c +++ b/serial.c @@ -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