ntdll: fix compile on systems without termios.port.c_ispeed/termios.port.c_ospeed structs
Austin English
austinenglish at gmail.com
Thu Oct 7 03:05:46 CDT 2010
--
-Austin
-------------- next part --------------
diff --git a/configure.ac b/configure.ac
index 52fee51..c6e99c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2176,6 +2176,18 @@ AC_CHECK_MEMBERS([struct ifreq.ifr_hwaddr],,,
# include <net/if.h>
#endif])
+dnl Check for struct termios.port.c_ospeed
+AC_CHECK_MEMBERS([struct termios.port.c_ospeed],,,
+[#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#endif])
+
+dnl Check for struct termios.port.c_ispeed
+AC_CHECK_MEMBERS([struct termios.port.c_ispeed],,,
+[#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#endif])
+
dnl Check for the external timezone variables timezone and daylight
AC_CACHE_CHECK([for timezone variable], ac_cv_have_timezone,
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[timezone = 1]])],[ac_cv_have_timezone="yes"],[ac_cv_have_timezone="no"]))
diff --git a/dlls/ntdll/serial.c b/dlls/ntdll/serial.c
index b52ff22..534ecea 100644
--- a/dlls/ntdll/serial.c
+++ b/dlls/ntdll/serial.c
@@ -498,7 +498,7 @@ static NTSTATUS set_baud_rate(int fd, const SERIAL_BAUD_RATE* sbr)
return STATUS_NOT_SUPPORTED;
#endif /* Don't have linux/serial.h or lack TIOCSSERIAL */
}
-#elif !defined(__EMX__)
+#elif !defined(__EMX__) && defined (_HAVE_STRUCT_TERMIOS_C_ISPEED) && defined (_HAVE_STRUCT_TERMIOS_C_OSPEED)
switch (sbr->BaudRate)
{
case 0: port.c_ospeed = B0; break;
More information about the wine-patches
mailing list