summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/serialport/qserialport_unix.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp
index 8140e079..dc8d9af7 100644
--- a/src/serialport/qserialport_unix.cpp
+++ b/src/serialport/qserialport_unix.cpp
@@ -260,6 +260,11 @@ bool QSerialPortPrivate::open(QIODevice::OpenMode mode)
if (!updateTermios())
return false;
+#ifdef Q_OS_LINUX
+ isCustomBaudRateSupported = (::ioctl(descriptor, TIOCGSERIAL, &currentSerialInfo) != -1)
+ && (::ioctl(descriptor, TIOCSSERIAL, &currentSerialInfo) != -1);
+#endif
+
setExceptionNotificationEnabled(true);
if ((flags & O_WRONLY) == 0)